[PATCH v9 02/24] KVM: Move architecture capability Kconfigs to header defines
Steffen Eiden
seiden at linux.ibm.com
Tue Oct 13 00:50:17 PDT 2026
On Mon, Oct 12, 2026 at 07:53:43PM +0200, Paolo Bonzini wrote:
> On 9/30/26 19:34, Steffen Eiden wrote:
> > Historically, KVM feature opt-ins and callbacks were configured globally
> > via Kconfig symbols (CONFIG_HAVE_KVM_* and CONFIG_KVM_*).
>
> Not all of them - there are many __KVM_HAVE_* symbols already. In
> particular now there's both KVM_MSI and __KVM_HAVE_MSI/__KVM_HAVE_MSIX (but
> the latter is dead, so I have sent a patch to remove it).
>
> There are several remaining CONFIG_HAVE_KVM_ARCH_* Kconfig symbols as well.
> That's okay, but it should be noted in the changelog that not all symbols
> were fixed.
>
> Can you at least quickly provide a v2, that changes all symbols to
> __KVM_HAVE_<function-name> (and when not applicable __KVM_*, for example
> __KVM_HAVE_READONLY_MEM)? I have already changed KVM_NO_MMIO to
> __KVM_NO_MMIO in kvm/queue.
>
Yes, no problem.
Using this pattern would reintroduce __KVM_HAVE_MSI then, right?
I would create those symbols:
- __KVM_HAVE_INVALID_WAKEUPS (formerly KVM_INVALID_WAKEUPS)
- __KVM_HAVE_MSI (formerly HAVE_KVM_MSI)
- __KVM_HAVE_NO_POLL (formerly HAVE_KVM_NO_POLL)
- __KVM_HAVE_READONLY_MEM (formerly HAVE_KVM_READONLY_MEM)
- __KVM_HAVE_VCPU_RUN_PID_CHANGE (formerly HAVE_KVM_VCPU_RUN_PID_CHANGE)
OK?
Steffen
> Thanks,
>
> Paolo
>
> > Replace these global Kconfig options with architecture-specific opt-in
> > defines in <asm/kvm_host.h> and standardize their naming by dropping the
> > HAVE_ prefix:
> > - KVM_INVALID_WAKEUPS
> > - KVM_MSI (formerly HAVE_KVM_MSI)
> > - KVM_NO_POLL (formerly HAVE_KVM_NO_POLL)
> > - KVM_READONLY_MEM (formerly HAVE_KVM_READONLY_MEM)
> > - KVM_VCPU_RUN_PID_CHANGE (formerly HAVE_KVM_VCPU_RUN_PID_CHANGE)
> >
> > This allows each architecture and guest implementation to configure its
> > supported capabilities independently in its kvm_host header and eliminates
> > unnecessary fallback stubs across different KVM targets.
> >
> > Signed-off-by: Steffen Eiden <seiden at linux.ibm.com>
More information about the linux-arm-kernel
mailing list