[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f3504ad-a9a8-9716-ee0b-8f39ad15cba6@redhat.com>
Date: Thu, 22 Sep 2016 11:37:28 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Wanpeng Li <wanpeng.li@...mail.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
Bandan Das <bsd@...hat.com>
Subject: Re: [PATCH] KVM: nVMX: Fix the NMI IDT-vectoring info handling
On 22/09/2016 05:34, Wanpeng Li wrote:
> - if (vmx->rmode.vm86_active) {
> - if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE)
> - kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
> - return;
> + ++vcpu->stat.nmi_injections;
> + vmx->nmi_known_unmasked = false;
> + if (vmx->rmode.vm86_active) {
> + if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE)
> + kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
> + return;
> + }
> }
> vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
> INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR);
Hi,
the patch is mostly okay but the "if (vmx->rmode.vm86_active)" part
should be done also if the VCPU is in guest mode. See
vmx_queue_exception for a similar example.
I would like to know which processors lack virtual NMI support. I'd
rather rip that code out...
Thanks,
Paolo
Powered by blists - more mailing lists