hypervisor: Add translate_gva for x86/KVM

This commit adds `translate_gva` for x86/KVM. The same name function is
already implemented for MSHV, but the implementation differs as
KVM_TRANSLATE does not take the flag argument and does not return status
code. This change requires the newer version of kvm-ioctls [1].

[1]
97ff779b6e

Signed-off-by: Akira Moroo <retrage01@gmail.com>
This commit is contained in:
Akira Moroo
2022-02-20 11:44:25 +09:00
committed by Rob Bradford
parent 7c6bdf8804
commit 603ca0e21b
2 changed files with 19 additions and 1 deletions

View File

@@ -457,7 +457,7 @@ pub trait Vcpu: Send + Sync {
/// Triggers the running of the current virtual CPU returning an exit reason.
///
fn run(&self) -> std::result::Result<VmExit, HypervisorCpuError>;
#[cfg(all(feature = "mshv", target_arch = "x86_64"))]
#[cfg(target_arch = "x86_64")]
///
/// Translate guest virtual address to guest physical address
///