Re: [PATCH v4 1/8] x86/bugs: Use VM_CLEAR_CPU_BUFFERS in VMX as well
From: Pawan Gupta
Date: Wed Nov 12 2025 - 13:19:10 EST
On Wed, Nov 12, 2025 at 11:23:36AM +0100, Borislav Petkov wrote:
> On Tue, Nov 11, 2025 at 02:03:40PM -0800, Sean Christopherson wrote:
> > How about:
> >
> > /* If necessary, emit VERW on exit-to-userspace to clear CPU buffers. */
> > #define CLEAR_CPU_BUFFERS \
> > ALTERNATIVE "", __CLEAR_CPU_BUFFERS, X86_FEATURE_CLEAR_CPU_BUF
>
> By the "If necessary" you mean whether X86_FEATURE_CLEAR_CPU_BUF is set or
> not, I presume...
>
> I was just wondering whether this macro is going to be used somewhere else
> *except* on the kernel->user vector.
I believe the intent is to use it only at kernel->user transition.