On Thu, May 28, 2026, Jim Mattson wrote: > On Thu, May 28, 2026 at 2:14 AM Peter Zijlstra <[email protected]> wrote: > > > > On Wed, May 27, 2026 at 10:43:43AM -0700, Jim Mattson wrote: > > > > > [jim: Add EXPORT_STATIC_CALL_GPL(kvm_x86_get_cpl) so that KVM vendor > > > modules can call kvm_is_cpuid_allowed(). Fix typo in commit message.] > > > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > > index 1578c0ecbbd1..72bd3cddb026 100644 > > > --- a/arch/x86/kvm/x86.c > > > +++ b/arch/x86/kvm/x86.c > > > @@ -151,6 +151,7 @@ struct kvm_x86_ops kvm_x86_ops __read_mostly; > > > #include <asm/kvm-x86-ops.h> > > > EXPORT_STATIC_CALL_GPL(kvm_x86_get_cs_db_l_bits); > > > EXPORT_STATIC_CALL_GPL(kvm_x86_cache_reg); > > > +EXPORT_STATIC_CALL_GPL(kvm_x86_get_cpl); > > > > Are you aware of the distinction between EXPORT_STATIC_CALL_GPL() and > > EXPORT_STATIC_CALL_TRAMP_GPL() ? > > I am now. :) > > > Specifically, the former allows modules to do static_call_update(), > > while the latter does not. Whenever possible use the TRAMP thing, this > > allows modules to *call* the static_call, but not to redirect it. > > Sean - Can you fix this up when you apply it, or do you want a v5?
Neither, as detailed in my other response, using EXPORT_STATIC_CALL_TRAMP_GPL() requires switching kvm_x86_call() to static_call_mod(). We can do that, but I want to do it separately.

