[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251214184512.mkbxzrzmuqoej7kw@desk>
Date: Sun, 14 Dec 2025 10:45:12 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, David Kaplan <david.kaplan@....com>,
Nikolay Borisov <nik.borisov@...e.com>,
"H. Peter Anvin" <hpa@...or.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Asit Mallick <asit.k.mallick@...el.com>,
Tao Zhang <tao1.zhang@...el.com>
Subject: Re: [PATCH v6 6/9] x86/vmscape: Use static_call() for predictor flush
On Thu, Dec 11, 2025 at 11:50:50AM +0100, Peter Zijlstra wrote:
> On Mon, Dec 01, 2025 at 10:20:14PM -0800, Pawan Gupta wrote:
> > Adding more mitigation options at exit-to-userspace for VMSCAPE would
> > usually require a series of checks to decide which mitigation to use. In
> > this case, the mitigation is done by calling a function, which is decided
> > at boot. So, adding more feature flags and multiple checks can be avoided
> > by using static_call() to the mitigating function.
> >
> > Replace the flag-based mitigation selector with a static_call(). This also
> > frees the existing X86_FEATURE_IBPB_EXIT_TO_USER.
> >
> > Suggested-by: Dave Hansen <dave.hansen@...ux.intel.com>
> > Signed-off-by: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
> > ---
> > arch/x86/Kconfig | 1 +
> > arch/x86/include/asm/cpufeatures.h | 2 +-
> > arch/x86/include/asm/entry-common.h | 7 +++----
> > arch/x86/include/asm/nospec-branch.h | 3 +++
> > arch/x86/kernel/cpu/bugs.c | 5 ++++-
> > arch/x86/kvm/x86.c | 2 +-
> > 6 files changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index fa3b616af03a2d50eaf5f922bc8cd4e08a284045..066f62f15e67e85fda0f3fd66acabad9a9794ff8 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -2706,6 +2706,7 @@ config MITIGATION_TSA
> > config MITIGATION_VMSCAPE
> > bool "Mitigate VMSCAPE"
> > depends on KVM
> > + select HAVE_STATIC_CALL
>
> That can't be right.
Hmm, should be "depends on HAVE_STATIC_CALL". Will fix it, thanks.
Powered by blists - more mailing lists