From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Liran Alon <liran.alon@oracle.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Wanpeng Li" <wanpengli@tencent.com>,
"Jim Mattson" <jmattson@google.com>,
"Joerg Roedel" <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Reto Buerki" <reet@codelabs.ch>
Subject: Re: [PATCH 1/2] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter
Date: Fri, 27 Sep 2019 08:02:19 -0700 [thread overview]
Message-ID: <20190927150219.GB25513@linux.intel.com> (raw)
In-Reply-To: <EF5C03E7-E3C2-4372-955C-06FB416EB164@oracle.com>
On Fri, Sep 27, 2019 at 05:44:53PM +0300, Liran Alon wrote:
>
> > On 27 Sep 2019, at 17:27, Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> >
> > On Fri, Sep 27, 2019 at 03:06:02AM +0300, Liran Alon wrote:
> >>
> >>> On 27 Sep 2019, at 0:43, Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> >>>
> >>> + /*
> >>> + * Immediately write vmcs02.GUEST_CR3. It will be propagated to vmcs12
> >>> + * on nested VM-Exit, which can occur without actually running L2, e.g.
> >>> + * if L2 is entering HLT state, and thus without hitting vmx_set_cr3().
> >>> + */
> >>
> >> If I understand correctly, it’s not exactly if L2 is entering HLT state in
> >> general. (E.g. issue doesn’t occur if L2 runs HLT directly which is not
> >> configured to be intercepted by vmcs12). It’s specifically when L1 enters L2
> >> with a HLT guest-activity-state. I suggest rephrasing comment.
> >
> > I deliberately worded the comment so that it remains valid if there are
> > more conditions in the future that cause KVM to skip running L2. What if
> > I split the difference and make the changelog more explicit, but leave the
> > comment as is?
>
> I think what is confusing in comment is that it seems to also refer to the case
> where L2 directly enters HLT state without L1 intercept. Which isn’t related.
> So I would explicitly mention it’s when L1 enters L2 but don’t physically enter guest
> with vmcs02 because L2 is in HLT state.
Ah, gotcha, I'll tweak the wording.
next prev parent reply other threads:[~2019-09-27 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 21:43 [PATCH 0/2] KVM: nVMX: Bug fix for consuming stale vmcs02.GUEST_CR3 Sean Christopherson
2019-09-26 21:43 ` [PATCH 1/2] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter Sean Christopherson
2019-09-26 23:39 ` Jim Mattson
2019-09-27 14:22 ` Sean Christopherson
2019-09-27 0:06 ` Liran Alon
2019-09-27 14:27 ` Sean Christopherson
2019-09-27 14:44 ` Liran Alon
2019-09-27 15:02 ` Sean Christopherson [this message]
2019-09-26 21:43 ` [PATCH 2/2] KVM: VMX: Skip GUEST_CR3 VMREAD+VMWRITE if the VMCS is up-to-date Sean Christopherson
2019-09-27 12:11 ` Vitaly Kuznetsov
2019-09-27 14:24 ` Sean Christopherson
2019-09-27 7:45 ` [PATCH 0/2] KVM: nVMX: Bug fix for consuming stale vmcs02.GUEST_CR3 Reto Buerki
2019-09-27 12:12 ` Vitaly Kuznetsov
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=20190927150219.GB25513@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=pbonzini@redhat.com \
--cc=reet@codelabs.ch \
--cc=rkrcmar@redhat.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.