All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: sashiko-reviews@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Hide shadow VMCS right after VMCLEAR
Date: Tue, 21 Jul 2026 09:27:25 -0700	[thread overview]
Message-ID: <al-d7WPocYgEtgFU@google.com> (raw)
In-Reply-To: <CABgObfbL3t21yVeSwiLSjjOUER+rTYDPHYAH9YU4TWGRjx6XHg@mail.gmail.com>

On Tue, Jul 21, 2026, Paolo Bonzini wrote:
> On Tue, Jul 21, 2026 at 5:25 PM Sean Christopherson <seanjc@google.com> wrote:
> > FWIW, I had a pretty strong preference for Paolo's off-list suggestion of
> > explicitly disabling preemption, even before seeing Sashiko's response.  Every
> > other path the VMCLEARs the shadow VMCS runs with preemption disabled, IMO it's
> > more intuitive to follow suit here.  And even with the comment, it took a good
> > 5-10 minutes of staring to understand what exactly is going wrong, though that's
> > probably a me problem.
> 
> Well, it would be at least an us problem---but I thought I was in the
> minority... The only (IMO bad) reason to leave preemption enabled is
> to obscure the change, but that's a lost battle anyway these days so
> why bother.
> 
> That said, I am surprised that VMCLEAR/VMREAD/VMWRITE/VMPTRLD do not
> have a memory clobber, since they access internal processor registers
> and the compiler may reorder them without the clobber. Fixing that
> would also work around Sashiko's complaint, so I guess we should do it
> anyway? 

Ya, good point.  We should probably hardcode that into vmx_asm1() and vmx_asm2()?
INVVPID and INVEPT also need the "memory" clobber, no?

> And disabling preemption can be done separately on top of this change, which
> is already on its way to Linus.

+1

  reply	other threads:[~2026-07-21 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 10:28 [PATCH] KVM: nVMX: Hide shadow VMCS right after VMCLEAR Paolo Bonzini
2026-07-21 10:48 ` sashiko-bot
2026-07-21 15:24   ` Sean Christopherson
2026-07-21 16:02     ` Paolo Bonzini
2026-07-21 16:27       ` Sean Christopherson [this message]
2026-07-21 16:37         ` Paolo Bonzini

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=al-d7WPocYgEtgFU@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.