All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: kvmarm@lists.linux.dev
Cc: kvm@vger.kernel.org, Will Deacon <will@kernel.org>,
	Julien Thierry <julien.thierry.kdev@gmail.com>,
	Marc Zyngier <maz@kernel.org>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>
Subject: [PATCH kvmtool v2 5/9] arm64: Combine kvm-config-arch.h
Date: Fri,  4 Apr 2025 09:52:28 -0700	[thread overview]
Message-ID: <20250404165233.3205127-6-oliver.upton@linux.dev> (raw)
In-Reply-To: <20250404165233.3205127-1-oliver.upton@linux.dev>

You get the point...

Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
 arm/aarch64/include/kvm/kvm-config-arch.h     | 29 -------------------
 .../{arm-common => kvm}/kvm-config-arch.h     | 24 +++++++++++++--
 2 files changed, 22 insertions(+), 31 deletions(-)
 delete mode 100644 arm/aarch64/include/kvm/kvm-config-arch.h
 rename arm/include/{arm-common => kvm}/kvm-config-arch.h (54%)

diff --git a/arm/aarch64/include/kvm/kvm-config-arch.h b/arm/aarch64/include/kvm/kvm-config-arch.h
deleted file mode 100644
index 642fe67..0000000
--- a/arm/aarch64/include/kvm/kvm-config-arch.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef KVM__KVM_CONFIG_ARCH_H
-#define KVM__KVM_CONFIG_ARCH_H
-
-int vcpu_affinity_parser(const struct option *opt, const char *arg, int unset);
-int sve_vl_parser(const struct option *opt, const char *arg, int unset);
-
-#define ARM_OPT_ARCH_RUN(cfg)						\
-	OPT_BOOLEAN('\0', "aarch32", &(cfg)->aarch32_guest,		\
-			"Run AArch32 guest"),				\
-	OPT_BOOLEAN('\0', "pmu", &(cfg)->has_pmuv3,			\
-			"Create PMUv3 device. The emulated PMU will be" \
-			" set to the PMU associated with the"		\
-			" main thread, unless --vcpu-affinity is set"),	\
-	OPT_BOOLEAN('\0', "disable-mte", &(cfg)->mte_disabled,		\
-			"Disable Memory Tagging Extension"),		\
-	OPT_CALLBACK('\0', "vcpu-affinity", kvm, "cpulist",  		\
-			"Specify the CPU affinity that will apply to "	\
-			"all VCPUs", vcpu_affinity_parser, kvm),	\
-	OPT_U64('\0', "kaslr-seed", &(cfg)->kaslr_seed,			\
-			"Specify random seed for Kernel Address Space "	\
-			"Layout Randomization (KASLR)"),		\
-	OPT_BOOLEAN('\0', "no-pvtime", &(cfg)->no_pvtime, "Disable"	\
-			" stolen time"),				\
-	OPT_CALLBACK('\0', "sve-max-vl", NULL, "vector length",		\
-		     "Specify the max SVE vector length (in bits) for "	\
-		     "all vCPUs", sve_vl_parser, kvm),
-#include "arm-common/kvm-config-arch.h"
-
-#endif /* KVM__KVM_CONFIG_ARCH_H */
diff --git a/arm/include/arm-common/kvm-config-arch.h b/arm/include/kvm/kvm-config-arch.h
similarity index 54%
rename from arm/include/arm-common/kvm-config-arch.h
rename to arm/include/kvm/kvm-config-arch.h
index 4722d8f..ee031f0 100644
--- a/arm/include/arm-common/kvm-config-arch.h
+++ b/arm/include/kvm/kvm-config-arch.h
@@ -18,17 +18,37 @@ struct kvm_config_arch {
 };
 
 int irqchip_parser(const struct option *opt, const char *arg, int unset);
+int vcpu_affinity_parser(const struct option *opt, const char *arg, int unset);
+int sve_vl_parser(const struct option *opt, const char *arg, int unset);
 
 #define OPT_ARCH_RUN(pfx, cfg)							\
 	pfx,									\
-	ARM_OPT_ARCH_RUN(cfg)							\
+	OPT_BOOLEAN('\0', "aarch32", &(cfg)->aarch32_guest,			\
+			"Run AArch32 guest"),					\
+	OPT_BOOLEAN('\0', "pmu", &(cfg)->has_pmuv3,				\
+			"Create PMUv3 device. The emulated PMU will be" 	\
+			" set to the PMU associated with the"			\
+			" main thread, unless --vcpu-affinity is set"),		\
+	OPT_BOOLEAN('\0', "disable-mte", &(cfg)->mte_disabled,			\
+			"Disable Memory Tagging Extension"),			\
+	OPT_CALLBACK('\0', "vcpu-affinity", kvm, "cpulist",  			\
+			"Specify the CPU affinity that will apply to "		\
+			"all VCPUs", vcpu_affinity_parser, kvm),		\
+	OPT_U64('\0', "kaslr-seed", &(cfg)->kaslr_seed,				\
+			"Specify random seed for Kernel Address Space "		\
+			"Layout Randomization (KASLR)"),			\
+	OPT_BOOLEAN('\0', "no-pvtime", &(cfg)->no_pvtime, "Disable"		\
+			" stolen time"),					\
+	OPT_CALLBACK('\0', "sve-max-vl", NULL, "vector length",			\
+		     "Specify the max SVE vector length (in bits) for "		\
+		     "all vCPUs", sve_vl_parser, kvm),				\
 	OPT_STRING('\0', "dump-dtb", &(cfg)->dump_dtb_filename,			\
 		   ".dtb file", "Dump generated .dtb to specified file"),	\
 	OPT_UINTEGER('\0', "override-bad-firmware-cntfrq", &(cfg)->force_cntfrq,\
 		     "Specify Generic Timer frequency in guest DT to "		\
 		     "work around buggy secure firmware *Firmware should be "	\
 		     "updated to program CNTFRQ correctly*"),			\
-	OPT_CALLBACK_NOOPT('\0', "force-pci", NULL, "",			\
+	OPT_CALLBACK_NOOPT('\0', "force-pci", NULL, "",				\
 			   "Force virtio devices to use PCI as their default "	\
 			   "transport (Deprecated: Use --virtio-transport "	\
 			   "option instead)", virtio_transport_parser, kvm),	\
-- 
2.39.5


  parent reply	other threads:[~2025-04-04 16:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 16:52 [PATCH kvmtool v2 0/9] arm: Drop support for 32-bit kvmtool Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 1/9] Drop support for 32-bit arm Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 2/9] arm64: Move arm64-only features into main directory Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 3/9] arm64: Combine kvm.c Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 4/9] arm64: Merge kvm-cpu.c Oliver Upton
2025-04-04 16:52 ` Oliver Upton [this message]
2025-04-04 16:52 ` [PATCH kvmtool v2 6/9] arm64: Move remaining kvm/* headers Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 7/9] arm64: Move asm headers Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 8/9] arm64: Rename top-level directory Oliver Upton
2025-04-04 16:52 ` [PATCH kvmtool v2 9/9] arm64: Get rid of the 'arm-common' include directory Oliver Upton
2025-04-04 16:52 ` [PATCH v4 00/19] KVM: arm64: Debug cleanups Oliver Upton
2025-04-04 16:55   ` Oliver Upton
2025-04-17 14:27 ` [PATCH kvmtool v2 0/9] arm: Drop support for 32-bit kvmtool Will Deacon

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=20250404165233.3205127-6-oliver.upton@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=alexandru.elisei@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=will@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.