KVM: define __KVM_HAVE_GUEST_DEBUG unconditionally
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2024 08:12:59 +0000 (03:12 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Feb 2024 13:41:06 +0000 (08:41 -0500)
Since all architectures (for historical reasons) have to define
struct kvm_guest_debug_arch, and since userspace has to check
KVM_CHECK_EXTENSION(KVM_CAP_SET_GUEST_DEBUG) anyway, there is
no advantage in masking the capability #define itself.  Remove
the #define __KVM_HAVE_GUEST_DEBUG from architecture-specific
headers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/arm64/include/uapi/asm/kvm.h
arch/powerpc/include/uapi/asm/kvm.h
arch/s390/include/uapi/asm/kvm.h
arch/x86/include/uapi/asm/kvm.h
include/uapi/linux/kvm.h

index 9c1040dad4eb3d6917bbe11dafb551d4a07e10d9..964df31da9751c96c984358c66d6f73c8519b2e7 100644 (file)
@@ -37,7 +37,6 @@
 #include <asm/ptrace.h>
 #include <asm/sve_context.h>
 
-#define __KVM_HAVE_GUEST_DEBUG
 #define __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_VCPU_EVENTS
 
index a96ef6b36bbab1d90e4d0821e2ca0fa24f17bcd1..1691297a766a9c1a4df9384c4ff02ecd8ce21b92 100644 (file)
@@ -28,7 +28,6 @@
 #define __KVM_HAVE_PPC_SMT
 #define __KVM_HAVE_IRQCHIP
 #define __KVM_HAVE_IRQ_LINE
-#define __KVM_HAVE_GUEST_DEBUG
 
 /* Not always available, but if it is, this is the correct offset.  */
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
index fee712ff1cf8b5dc8f92b61d24901459f75b2494..05eaf6db3ad4cba4269b1ce36563096eab236b1d 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 
 #define __KVM_S390
-#define __KVM_HAVE_GUEST_DEBUG
 
 struct kvm_s390_skeys {
        __u64 start_gfn;
index c5e682ee7726d3bfd67ce7dd7b639b0ab81aece4..0ad6bda1fc39174798440c887d69cba2d3bc9a31 100644 (file)
@@ -42,7 +42,6 @@
 #define __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_MSI
 #define __KVM_HAVE_USER_NMI
-#define __KVM_HAVE_GUEST_DEBUG
 #define __KVM_HAVE_MSIX
 #define __KVM_HAVE_MCE
 #define __KVM_HAVE_PIT_STATE2
index 00d5cecd057d88ff82501458f3de3094c0caed23..2ad6aa81b03fbd43066c43964fe90f141b478882 100644 (file)
 
 #define KVM_API_VERSION 12
 
+/*
+ * Backwards-compatible definitions.
+ */
+#define __KVM_HAVE_GUEST_DEBUG
+
 /* for KVM_SET_USER_MEMORY_REGION */
 struct kvm_userspace_memory_region {
        __u32 slot;
@@ -682,9 +687,7 @@ struct kvm_enable_cap {
 /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */
 #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21
 #define KVM_CAP_USER_NMI 22
-#ifdef __KVM_HAVE_GUEST_DEBUG
 #define KVM_CAP_SET_GUEST_DEBUG 23
-#endif
 #ifdef __KVM_HAVE_PIT
 #define KVM_CAP_REINJECT_CONTROL 24
 #endif