vmm: move kvm feature gate right before the if condition
This change uses the kvm feature gate cleaner way
in the handling of PIO/MMIO exits.
@@ -920,7 +920,6 @@ impl CpuManager {
// to be executed.
#[cfg(feature = "kvm")]
- {
if matches!(hypervisor_type, HypervisorType::Kvm) {
vcpu.lock().as_ref().unwrap().vcpu.set_immediate_exit(true);
if !matches!(vcpu.lock().unwrap().run(), Ok(VmExit::Ignore)) {
@@ -929,7 +928,6 @@ impl CpuManager {
}
vcpu.lock().as_ref().unwrap().vcpu.set_immediate_exit(false);
}
- }
vcpu_run_interrupted.store(true, Ordering::SeqCst);
while vcpu_pause_signalled.load(Ordering::SeqCst) {
