diff options
| author | Steffen Eiden <seiden@linux.ibm.com> | 2026-10-13 14:13:43 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2026-10-14 18:20:39 +0200 |
| commit | 1499fd7cd2e141c5cda4013fb4ed828d34efedcc (patch) | |
| tree | e26b89a50682013f1b973fe43c6ae5a051fd5ae1 /virt | |
| parent | 71cf35e389b1b5a8851762ec7c74fded53342cc6 (diff) | |
KVM: Move architecture capability Kconfigs to header defines
With s390 hosting multiple independent KVM implementations within the
same kernel build (native s390 KVM and arm64 on s390), global Kconfig
selections force both implementations to inherit options that only apply
to one of them.
Replace global Kconfig options which only apply to one KVM
implementation with architecture-specific opt-in defines in the
respective <asm/kvm_host.h>. Only remove Kconfig symbols that would be
different on both s390 KVM implementations
- __KVM_HAVE_INVALID_WAKEUPS (formerly HAVE_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)
This allows each architecture and guest implementation to configure its
supported capabilities independently in its kvm_host header and eliminates
adding unnecessary fallback stubs across different KVM targets.
Acked-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Link: https://patch.msgid.link/20261013121343.1997112-1-seiden@linux.ibm.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
| -rw-r--r-- | virt/kvm/Kconfig | 15 | ||||
| -rw-r--r-- | virt/kvm/kvm_main.c | 4 |
2 files changed, 2 insertions, 17 deletions
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index c3c0ee253fc7..f3d7f66746c8 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig @@ -50,21 +50,12 @@ config KVM_ASYNC_PF config KVM_ASYNC_PF_SYNC bool -config HAVE_KVM_MSI - bool - -config HAVE_KVM_READONLY_MEM - bool - config HAVE_KVM_CPU_RELAX_INTERCEPT bool config KVM_VFIO bool -config HAVE_KVM_INVALID_WAKEUPS - bool - config KVM_GENERIC_DIRTYLOG_READ_PROTECT bool @@ -79,12 +70,6 @@ config HAVE_KVM_IRQ_BYPASS tristate select IRQ_BYPASS_MANAGER -config HAVE_KVM_VCPU_RUN_PID_CHANGE - bool - -config HAVE_KVM_NO_POLL - bool - config VIRT_XFER_TO_GUEST_WORK bool diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 09ee08092ced..fe6dc0bf3bde 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -4903,7 +4903,7 @@ static int kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: case KVM_CAP_INTERNAL_ERROR_DATA: -#ifdef CONFIG_HAVE_KVM_MSI +#ifdef __KVM_HAVE_MSI case KVM_CAP_SIGNAL_MSI: #endif #ifdef CONFIG_HAVE_KVM_IRQCHIP @@ -5293,7 +5293,7 @@ static long kvm_vm_ioctl(struct file *filp, r = kvm_ioeventfd(kvm, &data); break; } -#ifdef CONFIG_HAVE_KVM_MSI +#ifdef __KVM_HAVE_MSI case KVM_SIGNAL_MSI: { struct kvm_msi msi; |
