diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-04-29 18:46:42 +0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-05-03 05:17:38 +0400 |
commit | 03b28f8133165dbe4cd922054d599e26b8119508 (patch) | |
tree | 990c42340b746bf2fa527f1febc109826f981029 /arch/x86/kvm/x86.c | |
parent | 5975a2e0950291a6bfe9fd5880e7952ff87764be (diff) | |
download | linux-03b28f8133165dbe4cd922054d599e26b8119508.tar.xz |
KVM: x86: Account for failing enable_irq_window for NMI window request
With VMX, enable_irq_window can now return -EBUSY, in which case an
immediate exit shall be requested before entering the guest. Account for
this also in enable_nmi_window which uses enable_irq_window in absence
of vnmi support, e.g.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 96f914e828d4..94f35d22c5fb 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5756,7 +5756,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) /* enable NMI/IRQ window open exits if needed */ if (vcpu->arch.nmi_pending) - kvm_x86_ops->enable_nmi_window(vcpu); + req_immediate_exit = + kvm_x86_ops->enable_nmi_window(vcpu) != 0; else if (kvm_cpu_has_injectable_intr(vcpu) || req_int_win) req_immediate_exit = kvm_x86_ops->enable_irq_window(vcpu) != 0; |