Commit cd2633c5 authored by Jan Kiszka's avatar Jan Kiszka Committed by Paolo Bonzini

nVMX: Fix pick-up of uninjected NMIs

__vmx_complete_interrupts stored uninjected NMIs in arch.nmi_injected,
not arch.nmi_pending. So we actually need to check the former field in
vmcs12_save_pending_event. This fixes the eventinj unit test when run
in nested KVM.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d3134dbf
...@@ -8078,7 +8078,7 @@ static void vmcs12_save_pending_event(struct kvm_vcpu *vcpu, ...@@ -8078,7 +8078,7 @@ static void vmcs12_save_pending_event(struct kvm_vcpu *vcpu,
} }
vmcs12->idt_vectoring_info_field = idt_vectoring; vmcs12->idt_vectoring_info_field = idt_vectoring;
} else if (vcpu->arch.nmi_pending) { } else if (vcpu->arch.nmi_injected) {
vmcs12->idt_vectoring_info_field = vmcs12->idt_vectoring_info_field =
INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR; INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR;
} else if (vcpu->arch.interrupt.pending) { } else if (vcpu->arch.interrupt.pending) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment