Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Fuad Tabba <tabba@google.com>
To: kvmarm@lists.linux.dev
Cc: maz@kernel.org, oliver.upton@linux.dev, catalin.marinas@arm.com,
	 joey.gouly@arm.com, suzuki.poulose@arm.com,
	yuzenghui@huawei.com,  will@kernel.org, christoffer.dall@arm.com,
	tabba@google.com
Subject: [PATCH v1 2/4] KVM: arm64: Move KVM_VCPU_MAX_FEATURES to the features it is counting
Date: Mon, 14 Oct 2024 17:58:07 +0100	[thread overview]
Message-ID: <20241014165809.984883-3-tabba@google.com> (raw)
In-Reply-To: <20241014165809.984883-1-tabba@google.com>

Move KVM_VCPU_MAX_FEATURES to the header file that has the
features it is counting. Having it there reduces the chances of
missing to update it.

No functional change intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
---
 arch/arm64/include/asm/kvm_host.h | 3 ---
 arch/arm64/include/uapi/asm/kvm.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 78c068592d73..85901afeb332 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -39,9 +39,6 @@
 
 #define KVM_MAX_VCPUS VGIC_V3_MAX_CPUS
 
-#define KVM_VCPU_MAX_FEATURES 8
-#define KVM_VCPU_VALID_FEATURES	(BIT(KVM_VCPU_MAX_FEATURES) - 1)
-
 #define KVM_REQ_SLEEP \
 	KVM_ARCH_REQ_FLAGS(0, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
 #define KVM_REQ_IRQ_PENDING	KVM_ARCH_REQ(1)
diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
index 964df31da975..2d5fd0ed7dff 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/arm64/include/uapi/asm/kvm.h
@@ -109,6 +109,9 @@ struct kvm_regs {
 #define KVM_ARM_VCPU_PTRAUTH_GENERIC	6 /* VCPU uses generic authentication */
 #define KVM_ARM_VCPU_HAS_EL2		7 /* Support nested virtualization */
 
+#define KVM_VCPU_MAX_FEATURES 8
+#define KVM_VCPU_VALID_FEATURES	(BIT(KVM_VCPU_MAX_FEATURES) - 1)
+
 struct kvm_vcpu_init {
 	__u32 target;
 	__u32 features[7];
-- 
2.47.0.rc1.288.g06298d1525-goog


  parent reply	other threads:[~2024-10-14 16:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 16:58 [PATCH v1 0/4] KVM: arm64: Update KVM_VCPU_MAX_FEATURES and refactor to avoid same issue Fuad Tabba
2024-10-14 16:58 ` [PATCH v1 1/4] KVM: arm64: Update the value of KVM_VCPU_MAX_FEATURES Fuad Tabba
2024-10-14 16:58 ` Fuad Tabba [this message]
2024-10-14 16:58 ` [PATCH v1 3/4] KVM: arm64: Convert KVM_ARM_VCPU_* features into an enum Fuad Tabba
2024-10-14 17:13   ` Marc Zyngier
2024-10-14 16:58 ` [PATCH v1 4/4] KVM: arm64: Convert KVM_ARCH_FLAG_* " Fuad Tabba
2024-10-14 17:17 ` [PATCH v1 0/4] KVM: arm64: Update KVM_VCPU_MAX_FEATURES and refactor to avoid same issue Marc Zyngier
2024-10-14 18:17   ` Fuad Tabba
2024-10-15 10:15     ` Marc Zyngier

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=20241014165809.984883-3-tabba@google.com \
    --to=tabba@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox