From: Thomas Huth <[email protected]> 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 <[email protected]> --- 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
