mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Wanpeng Li" <wanpeng.li@hotmail.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Bandan Das" <bsd@redhat.com>
Subject: Re: [PATCH] KVM: nVMX: Fix the NMI IDT-vectoring info handling
Date: Thu, 22 Sep 2016 11:37:28 +0200	[thread overview]
Message-ID: <0f3504ad-a9a8-9716-ee0b-8f39ad15cba6@redhat.com> (raw)
In-Reply-To: <1474515259-3197-1-git-send-email-wanpeng.li@hotmail.com>



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

  reply	other threads:[~2016-09-22  9:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  3:34 Wanpeng Li
2016-09-22  9:37 ` Paolo Bonzini [this message]
2016-09-22  9:45   ` Wanpeng Li
2016-09-22 10:04     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f3504ad-a9a8-9716-ee0b-8f39ad15cba6@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®