mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kvm <kvm@vger.kernel.org>, "Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@hotmail.com>
Subject: Re: [PATCH v2] KVM: nVMX: Fix losing NMI blocking state
Date: Tue, 25 Jul 2017 15:00:20 +0200	[thread overview]
Message-ID: <ff14a3af-08e2-528b-f6bd-ca6ba3d827c1@redhat.com> (raw)
In-Reply-To: <CANRm+Cw4ei6e1Y4uwy-csoahyV=gr+4ZMQuNbkMs14X2N3QNhA@mail.gmail.com>

On 25/07/2017 13:36, Wanpeng Li wrote:
>>  - during VMRESUME emulation, prepare_vmcs02 sets bit 3 in the
>>    interruptibility-state field of vmcs02, but nmi_known_unmasked is
>>    still true.
>>  - on the next L2 exit to L0, nmi_known_unmasked is true so
>>    vmx_recover_nmi_blocking does not do anything.
>> 
>> Can you explain instead what happens if your v1 patch is applied (on top of mine),
>> and why it fixes the bug.
>
> We will set the expected guest interruptibility-state field before the
> final step: L0 fixes the shadow page table (NGVA -> HPA), then L0
> resumes the guest w/ the expected guest interruptibility-state.

Aha, that makes sense indeed!  I was confused between the first page
fault (that is reflected to L1) and the second (that is fixed by L0).

Thanks!

Paolo

      reply	other threads:[~2017-07-25 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 10:40 Wanpeng Li
2017-07-25 10:55 ` Paolo Bonzini
2017-07-25 11:36   ` Wanpeng Li
2017-07-25 13:00     ` Paolo Bonzini [this message]

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=ff14a3af-08e2-528b-f6bd-ca6ba3d827c1@redhat.com \
    --to=pbonzini@redhat.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®