diff --git a/hypervisor/src/cpu.rs b/hypervisor/src/cpu.rs index 92de49362..f378d30c3 100644 --- a/hypervisor/src/cpu.rs +++ b/hypervisor/src/cpu.rs @@ -167,6 +167,7 @@ pub enum VmExit<'a> { MmioWrite(u64 /* address */, &'a [u8]), Ignore, Reset, + Hyperv, } /// diff --git a/hypervisor/src/kvm/mod.rs b/hypervisor/src/kvm/mod.rs index 2049459a0..7acb1c6a5 100644 --- a/hypervisor/src/kvm/mod.rs +++ b/hypervisor/src/kvm/mod.rs @@ -692,6 +692,7 @@ impl cpu::Vcpu for KvmVcpu { VcpuExit::MmioRead(addr, data) => Ok(cpu::VmExit::MmioRead(addr, data)), VcpuExit::MmioWrite(addr, data) => Ok(cpu::VmExit::MmioWrite(addr, data)), + VcpuExit::Hyperv => Ok(cpu::VmExit::Hyperv), r => Err(cpu::HypervisorCpuError::RunVcpu(anyhow!( "Unexpected exit reason on vcpu run: {:?}", diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index 8e6219e65..9c693f699 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -377,6 +377,8 @@ impl Vcpu { VmExit::Ignore => Ok(true), VmExit::Reset => Ok(false), + // No need to handle anything from a KVM HyperV exit + VmExit::Hyperv => Ok(true), }, Err(e) => Err(Error::VcpuRun(e.into())),