[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251112181738.bm3voyeyjfnqkgnc@desk>
Date: Wed, 12 Nov 2025 10:17:38 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...nel.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Brendan Jackman <jackmanb@...gle.com>
Subject: Re: [PATCH v4 1/8] x86/bugs: Use VM_CLEAR_CPU_BUFFERS in VMX as well
On Fri, Nov 07, 2025 at 08:05:34PM +0100, Borislav Petkov wrote:
> On Mon, Nov 03, 2025 at 10:18:40AM -0800, Pawan Gupta wrote:
> > diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
> > index 08ed5a2e46a5..2be9be782013 100644
> > --- a/arch/x86/include/asm/nospec-branch.h
> > +++ b/arch/x86/include/asm/nospec-branch.h
> > @@ -321,9 +321,11 @@
> > #endif
> > .endm
> >
> > +/* Primarily used in exit-to-userspace path */
>
> What does "primarily" mean here?
> $ git grep -w CLEAR_CPU_BUFFERS
>
> says *only* the kernel->user vector.
By the end of this series, yes. At this patch this is used in VMX also:
arch/x86/kvm/vmx/vmenter.S:164: CLEAR_CPU_BUFFERS
"Primarily" can be dropped by the patch that replaces it in SVM/VMX.
> > #define CLEAR_CPU_BUFFERS \
> > __CLEAR_CPU_BUFFERS X86_FEATURE_CLEAR_CPU_BUF
> >
> > +/* For use in KVM */
>
> That's why the "VM_" prefix is there.
>
> The comments in arch/x86/include/asm/cpufeatures.h actually already explain
> that, you could make them more explicit but let's not sprinkle comments
> willy-nilly.
As Sean pointed out, this goes away in later patches.
Powered by blists - more mailing lists