From: Thomas Huth <thuth@redhat.com>
To: "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
qemu-arm@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
qemu-devel@nongnu.org
Subject: [PATCH] hw/arm: Move the "arm-cpu" compat settings out of hw/core/machine.c
Date: Tue, 20 Jan 2026 13:21:08 +0100 [thread overview]
Message-ID: <20260120122108.131708-1-thuth@redhat.com> (raw)
From: Thomas Huth <thuth@redhat.com>
The hw_compat_* arrays in hw/core/machine.c should be used for generic
compat settings that might affect all (or at least multiple) machines.
Target specific settings should rather go into the target specific
source files instead. For arm/aarch64, the virt machine is the only
one that cares about compat settings, so move the "arm-cpu" related
switches to hw/arm/virt.c now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/arm/virt.c | 10 ++++++++++
hw/core/machine.c | 2 --
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 4badc1a7348..99040e08f6a 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3571,8 +3571,13 @@ DEFINE_VIRT_MACHINE(10, 0)
static void virt_machine_9_2_options(MachineClass *mc)
{
+ static GlobalProperty compat_9_2[] = {
+ { "arm-cpu", "backcompat-pauth-default-use-qarma5", "true"},
+ };
+
virt_machine_10_0_options(mc);
compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len);
+ compat_props_add(mc->compat_props, compat_9_2, G_N_ELEMENTS(compat_9_2));
}
DEFINE_VIRT_MACHINE(9, 2)
@@ -3589,9 +3594,14 @@ DEFINE_VIRT_MACHINE(9, 1)
static void virt_machine_9_0_options(MachineClass *mc)
{
+ static GlobalProperty compat_9_0[] = {
+ { "arm-cpu", "backcompat-cntfrq", "true" },
+ };
+
virt_machine_9_1_options(mc);
mc->smbios_memory_device_size = 16 * GiB;
compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+ compat_props_add(mc->compat_props, compat_9_0, G_N_ELEMENTS(compat_9_0));
}
DEFINE_VIRT_MACHINE(9, 0)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 6411e68856b..1c1de7b5d18 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -59,7 +59,6 @@ GlobalProperty hw_compat_10_0[] = {
const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
GlobalProperty hw_compat_9_2[] = {
- { "arm-cpu", "backcompat-pauth-default-use-qarma5", "true"},
{ "virtio-balloon-pci", "vectors", "0" },
{ "virtio-balloon-pci-transitional", "vectors", "0" },
{ "virtio-balloon-pci-non-transitional", "vectors", "0" },
@@ -76,7 +75,6 @@ GlobalProperty hw_compat_9_1[] = {
const size_t hw_compat_9_1_len = G_N_ELEMENTS(hw_compat_9_1);
GlobalProperty hw_compat_9_0[] = {
- { "arm-cpu", "backcompat-cntfrq", "true" },
{ "scsi-hd", "migrate-emulated-scsi-request", "false" },
{ "scsi-cd", "migrate-emulated-scsi-request", "false" },
{ "vfio-pci", "skip-vsc-check", "false" },
--
2.52.0
next reply other threads:[~2026-01-20 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 12:21 Thomas Huth [this message]
2026-01-20 12:55 ` [PATCH] hw/arm: Move the "arm-cpu" compat settings out of hw/core/machine.c Peter Maydell
2026-01-20 14:15 ` Thomas Huth
2026-01-20 14:24 ` Peter Maydell
2026-01-21 17:36 ` Cornelia Huck
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=20260120122108.131708-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wangyanan55@huawei.com \
--cc=zhao1.liu@intel.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 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.