Skip to content

Commit 6bda055

Browse files
committed
KVM: define __KVM_HAVE_GUEST_DEBUG unconditionally
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>
1 parent 8886640 commit 6bda055

File tree

5 files changed

+5
-6
lines changed
  • arch
    • arm64/include/uapi/asm
    • powerpc/include/uapi/asm
    • s390/include/uapi/asm
    • x86/include/uapi/asm
  • include/uapi/linux

5 files changed

+5
-6
lines changed

arch/arm64/include/uapi/asm/kvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include <asm/ptrace.h>
3838
#include <asm/sve_context.h>
3939

40-
#define __KVM_HAVE_GUEST_DEBUG
4140
#define __KVM_HAVE_IRQ_LINE
4241
#define __KVM_HAVE_VCPU_EVENTS
4342

arch/powerpc/include/uapi/asm/kvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#define __KVM_HAVE_PPC_SMT
2929
#define __KVM_HAVE_IRQCHIP
3030
#define __KVM_HAVE_IRQ_LINE
31-
#define __KVM_HAVE_GUEST_DEBUG
3231

3332
/* Not always available, but if it is, this is the correct offset. */
3433
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1

arch/s390/include/uapi/asm/kvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/types.h>
1313

1414
#define __KVM_S390
15-
#define __KVM_HAVE_GUEST_DEBUG
1615

1716
struct kvm_s390_skeys {
1817
__u64 start_gfn;

arch/x86/include/uapi/asm/kvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#define __KVM_HAVE_IRQ_LINE
4343
#define __KVM_HAVE_MSI
4444
#define __KVM_HAVE_USER_NMI
45-
#define __KVM_HAVE_GUEST_DEBUG
4645
#define __KVM_HAVE_MSIX
4746
#define __KVM_HAVE_MCE
4847
#define __KVM_HAVE_PIT_STATE2

include/uapi/linux/kvm.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
#define KVM_API_VERSION 12
1818

19+
/*
20+
* Backwards-compatible definitions.
21+
*/
22+
#define __KVM_HAVE_GUEST_DEBUG
23+
1924
/* for KVM_SET_USER_MEMORY_REGION */
2025
struct kvm_userspace_memory_region {
2126
__u32 slot;
@@ -682,9 +687,7 @@ struct kvm_enable_cap {
682687
/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */
683688
#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21
684689
#define KVM_CAP_USER_NMI 22
685-
#ifdef __KVM_HAVE_GUEST_DEBUG
686690
#define KVM_CAP_SET_GUEST_DEBUG 23
687-
#endif
688691
#ifdef __KVM_HAVE_PIT
689692
#define KVM_CAP_REINJECT_CONTROL 24
690693
#endif

0 commit comments

Comments
 (0)