KVM: VMX: Fix interrupt checking on lightweight exit
authorGregory Haskins <ghaskins@novell.com>
Thu, 31 May 2007 18:08:58 +0000 (14:08 -0400)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:48 +0000 (12:05 +0300)
With kernel-injected interrupts, we need to check for interrupts on
lightweight exits too.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/vmx.c

index d06c3627f64095ca81a9dcd9676164f446aec8b9..b47ddccc7d7aa538ae8910a9b8793d89412e647c 100644 (file)
@@ -1992,13 +1992,13 @@ static int vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
        int r;
 
 preempted:
-       if (!vcpu->mmio_read_completed)
-               do_interrupt_requests(vcpu, kvm_run);
-
        if (vcpu->guest_debug.enabled)
                kvm_guest_debug_pre(vcpu);
 
 again:
+       if (!vcpu->mmio_read_completed)
+               do_interrupt_requests(vcpu, kvm_run);
+
        vmx_save_host_state(vcpu);
        kvm_load_guest_fpu(vcpu);