diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2008-11-24 12:26:19 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 16:55:47 +0200 |
commit | 264ff01d55b456932cef03082448b41d2edeb6a1 (patch) | |
tree | 7b660410647d36dac8abe94dd4721361b033a035 /arch/x86/kvm | |
parent | defaf1587c5d7dff828f6f11c8941e5bcef00f50 (diff) | |
download | linux-264ff01d55b456932cef03082448b41d2edeb6a1.tar.bz2 |
KVM: VMX: Fix pending NMI-vs.-IRQ race for user space irqchip
As with the kernel irqchip, don't allow an NMI to stomp over an already
injected IRQ; instead wait for the IRQ injection to be completed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e446f232588e..487e1dcdce33 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2486,7 +2486,9 @@ static void do_interrupt_requests(struct kvm_vcpu *vcpu, vmx_update_window_states(vcpu); if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) { - if (vcpu->arch.nmi_window_open) { + if (vcpu->arch.interrupt.pending) { + enable_nmi_window(vcpu); + } else if (vcpu->arch.nmi_window_open) { vcpu->arch.nmi_pending = false; vcpu->arch.nmi_injected = true; } else { |