diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2008-11-24 06:26:19 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:47 -0500 |
commit | 264ff01d55b456932cef03082448b41d2edeb6a1 (patch) | |
tree | 7b660410647d36dac8abe94dd4721361b033a035 | |
parent | defaf1587c5d7dff828f6f11c8941e5bcef00f50 (diff) |
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>
-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, | |||
2486 | vmx_update_window_states(vcpu); | 2486 | vmx_update_window_states(vcpu); |
2487 | 2487 | ||
2488 | if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) { | 2488 | if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) { |
2489 | if (vcpu->arch.nmi_window_open) { | 2489 | if (vcpu->arch.interrupt.pending) { |
2490 | enable_nmi_window(vcpu); | ||
2491 | } else if (vcpu->arch.nmi_window_open) { | ||
2490 | vcpu->arch.nmi_pending = false; | 2492 | vcpu->arch.nmi_pending = false; |
2491 | vcpu->arch.nmi_injected = true; | 2493 | vcpu->arch.nmi_injected = true; |
2492 | } else { | 2494 | } else { |