lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter
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.

\
 
 \ /
  Last update: 2019-09-27 17:03    [W:0.036 / U:7.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site