All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	pbonzini@redhat.com, tglx@kernel.org,  mingo@redhat.com,
	bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
	 hpa@zytor.com, shuah@kernel.org, kvm@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	 ctpence@google.com, David.Kaplan@amd.com,
	binbin.wu@linux.intel.com
Subject: Re: [PATCH v4 1/5] KVM: x86: Consolidate CPUID fault handling for emulator and interception logic
Date: Thu, 28 May 2026 09:08:02 -0700	[thread overview]
Message-ID: <ahhoYs4B-VUoqhTq@google.com> (raw)
In-Reply-To: <CALMp9eS5xT2PKHW4RWNsY0d9jKpA_xOrOpyZjY8CT6E80W-42w@mail.gmail.com>

On Thu, May 28, 2026, Jim Mattson wrote:
> On Thu, May 28, 2026 at 2:14 AM Peter Zijlstra <peterz@infradead.org> 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.

  reply	other threads:[~2026-05-28 16:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 17:43 [PATCH v4 0/5] KVM: x86: Virtualize AMD's "disable CPUID in usermode" Jim Mattson
2026-05-27 17:43 ` [PATCH v4 1/5] KVM: x86: Consolidate CPUID fault handling for emulator and interception logic Jim Mattson
2026-05-28  9:13   ` Peter Zijlstra
2026-05-28 14:20     ` Jim Mattson
2026-05-28 16:08       ` Sean Christopherson [this message]
2026-05-28 16:06     ` Sean Christopherson
2026-05-27 17:43 ` [PATCH v4 2/5] KVM: x86: Prioritize CPUID faulting over CPUID VM-exits in nested VMX Jim Mattson
2026-05-27 17:43 ` [PATCH v4 3/5] KVM: x86: Remove supports_cpuid_fault() helper Jim Mattson
2026-05-27 17:43 ` [PATCH v4 4/5] KVM: x86: Virtualize AMD CPUID faulting Jim Mattson
2026-05-27 17:43 ` [PATCH v4 5/5] KVM: selftests: Update hwcr_msr_test for CPUID faulting bit Jim Mattson
2026-05-29 22:47 ` [PATCH v4 0/5] KVM: x86: Virtualize AMD's "disable CPUID in usermode" Sean Christopherson
2026-06-06 15:12   ` Jim Mattson
2026-06-06 16:00     ` Jim Mattson

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=ahhoYs4B-VUoqhTq@google.com \
    --to=seanjc@google.com \
    --cc=David.Kaplan@amd.com \
    --cc=binbin.wu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=ctpence@google.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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.