All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [PATCH 7/8] KVM: define __KVM_HAVE_GUEST_DEBUG unconditionally
Date: Wed, 31 Jan 2024 18:30:55 -0500	[thread overview]
Message-ID: <20240131233056.10845-8-pbonzini@redhat.com> (raw)
In-Reply-To: <20240131233056.10845-1-pbonzini@redhat.com>

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   | 1 -
 arch/powerpc/include/uapi/asm/kvm.h | 1 -
 arch/s390/include/uapi/asm/kvm.h    | 1 -
 arch/x86/include/uapi/asm/kvm.h     | 1 -
 include/uapi/linux/kvm.h            | 3 +--
 5 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
index 9c1040dad4eb..964df31da975 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/arm64/include/uapi/asm/kvm.h
@@ -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
 
diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
index a96ef6b36bba..1691297a766a 100644
--- a/arch/powerpc/include/uapi/asm/kvm.h
+++ b/arch/powerpc/include/uapi/asm/kvm.h
@@ -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
diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h
index fee712ff1cf8..05eaf6db3ad4 100644
--- a/arch/s390/include/uapi/asm/kvm.h
+++ b/arch/s390/include/uapi/asm/kvm.h
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 
 #define __KVM_S390
-#define __KVM_HAVE_GUEST_DEBUG
 
 struct kvm_s390_skeys {
 	__u64 start_gfn;
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h
index c5e682ee7726..0ad6bda1fc39 100644
--- a/arch/x86/include/uapi/asm/kvm.h
+++ b/arch/x86/include/uapi/asm/kvm.h
@@ -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
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 00d5cecd057d..fd5aa4bf77f7 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -16,6 +16,11 @@
 
 #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;
@@ -689,9 +690,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
-- 
2.39.0



  parent reply	other threads:[~2024-01-31 23:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 23:30 [PATCH 0/8] KVM: cleanup linux/kvm.h Paolo Bonzini
2024-01-31 23:30 ` [PATCH 1/8] KVM: remove more traces of device assignment UAPI Paolo Bonzini
2024-01-31 23:30 ` [PATCH 2/8] KVM: x86: move x86-specific structs to uapi/asm/kvm.h Paolo Bonzini
2024-01-31 23:30 ` [PATCH 3/8] KVM: powerpc: move powerpc-specific " Paolo Bonzini
2024-01-31 23:30 ` [PATCH 4/8] KVM: s390: move s390-specific " Paolo Bonzini
2024-01-31 23:30 ` [PATCH 5/8] KVM: arm64: move ARM-specific defines " Paolo Bonzini
2024-01-31 23:30 ` [PATCH 6/8] kvm: replace __KVM_HAVE_READONLY_MEM with Kconfig symbol Paolo Bonzini
2024-01-31 23:30 ` Paolo Bonzini [this message]
2024-01-31 23:30 ` [PATCH 8/8] KVM: remove unnecessary #ifdef Paolo Bonzini
2024-02-07 14:42 ` [PATCH 0/8] KVM: cleanup linux/kvm.h Sean Christopherson
2024-02-08 13:39   ` Paolo Bonzini
2024-02-08 17:10     ` Sean Christopherson
2024-02-08 17:32       ` Paolo Bonzini

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=20240131233056.10845-8-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.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.