KVM: nVMX: Skip PF interception check when queuing during nested run
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 28 Apr 2013 07:24:41 +0000 (09:24 +0200)
committerGleb Natapov <gleb@redhat.com>
Sun, 28 Apr 2013 10:34:39 +0000 (13:34 +0300)
While a nested run is pending, vmx_queue_exception is only called to
requeue exceptions that were previously picked up via
vmx_cancel_injection. Therefore, we must not check for PF interception
by L1, possibly causing a bogus nested vmexit.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/vmx.c

index 74c525e2c6085716202a5b1c3625b96b490baf31..e10217e99d2c1f395fe1eef98b32c282ac81be69 100644 (file)
@@ -1917,7 +1917,7 @@ static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
        u32 intr_info = nr | INTR_INFO_VALID_MASK;
 
        if (nr == PF_VECTOR && is_guest_mode(vcpu) &&
-               nested_pf_handled(vcpu))
+           !vmx->nested.nested_run_pending && nested_pf_handled(vcpu))
                return;
 
        if (has_error_code) {