From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] nVMX: Fix pick-up of uninjected NMIs Date: Mon, 28 Oct 2013 13:57:20 +0100 Message-ID: <526E5F30.30501@redhat.com> References: <5267FC67.3@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28814 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756072Ab3J1M50 (ORCPT ); Mon, 28 Oct 2013 08:57:26 -0400 In-Reply-To: <5267FC67.3@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 23/10/2013 18:42, Jan Kiszka ha scritto: > __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: Jan Kiszka > --- > arch/x86/kvm/vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index feef3a1..81ce389 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -8078,7 +8078,7 @@ static void vmcs12_save_pending_event(struct kvm_vcpu *vcpu, > } > > vmcs12->idt_vectoring_info_field = idt_vectoring; > - } else if (vcpu->arch.nmi_pending) { > + } else if (vcpu->arch.nmi_injected) { > vmcs12->idt_vectoring_info_field = > INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR; > } else if (vcpu->arch.interrupt.pending) { > Applied to kvm.git queue, thanks. Paolo