@samitouri / QOSamiQemu / commits / 1bfa19a3fd

hw: add compat machines for 11.1

Add 11.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Reviewed-by: Eric Farman <farman@linux.ibm.com> # s390 Signed-off-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260331140347.653404-1-cohuck@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Cornelia Huck committed Mar 31, 2026 at 16:03 UTC 1bfa19a3fd51c91e7086eb47e67dfa37bc8670dd
10 files changed +76 -9
hw/arm/virt.c
+8 -1
@@ -4052,10 +4052,17 @@ static void machvirt_machine_init(void)
4052 }
4053 type_init(machvirt_machine_init);
4054
4055 +static void virt_machine_11_1_options(MachineClass *mc)
4056 +{
4057 +}
4058 +DEFINE_VIRT_MACHINE_AS_LATEST(11, 1)
4059 +
4060 static void virt_machine_11_0_options(MachineClass *mc)
4061 {
4062 + virt_machine_11_1_options(mc);
4063 + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len);
4064 }
4058 -DEFINE_VIRT_MACHINE_AS_LATEST(11, 0)
4065 +DEFINE_VIRT_MACHINE(11, 0)
4066
4067 static void virt_machine_10_2_options(MachineClass *mc)
4068 {
hw/core/machine.c
+3
@@ -38,6 +38,9 @@
38 #include "hw/acpi/generic_event_device.h"
39 #include "qemu/audio.h"
40
41 +GlobalProperty hw_compat_11_0[] = {};
42 +const size_t hw_compat_11_0_len = G_N_ELEMENTS(hw_compat_11_0);
43 +
44 GlobalProperty hw_compat_10_2[] = {
45 { "scsi-block", "migrate-pr", "off" },
46 { "isa-cirrus-vga", "global-vmstate", "true" },
hw/i386/pc.c
+3
@@ -73,6 +73,9 @@
73 #include "hw/xen/xen-bus.h"
74 #endif
75
76 +GlobalProperty pc_compat_11_0[] = {};
77 +const size_t pc_compat_11_0_len = G_N_ELEMENTS(pc_compat_11_0);
78 +
79 GlobalProperty pc_compat_10_2[] = {};
80 const size_t pc_compat_10_2_len = G_N_ELEMENTS(pc_compat_10_2);
81
hw/i386/pc_piix.c
+11 -2
@@ -428,12 +428,21 @@ static void pc_i440fx_machine_options(MachineClass *m)
428 pc_piix_compat_defaults, pc_piix_compat_defaults_len);
429 }
430
431 -static void pc_i440fx_machine_11_0_options(MachineClass *m)
431 +static void pc_i440fx_machine_11_1_options(MachineClass *m)
432 {
433 pc_i440fx_machine_options(m);
434 }
435
436 -DEFINE_I440FX_MACHINE_AS_LATEST(11, 0);
436 +DEFINE_I440FX_MACHINE_AS_LATEST(11, 1);
437 +
438 +static void pc_i440fx_machine_11_0_options(MachineClass *m)
439 +{
440 + pc_i440fx_machine_11_1_options(m);
441 + compat_props_add(m->compat_props, hw_compat_11_0, hw_compat_11_0_len);
442 + compat_props_add(m->compat_props, pc_compat_11_0, pc_compat_11_0_len);
443 +}
444 +
445 +DEFINE_I440FX_MACHINE(11, 0);
446
447 static void pc_i440fx_machine_10_2_options(MachineClass *m)
448 {
hw/i386/pc_q35.c
+11 -2
@@ -364,12 +364,21 @@ static void pc_q35_machine_options(MachineClass *m)
364 pc_q35_compat_defaults, pc_q35_compat_defaults_len);
365 }
366
367 -static void pc_q35_machine_11_0_options(MachineClass *m)
367 +static void pc_q35_machine_11_1_options(MachineClass *m)
368 {
369 pc_q35_machine_options(m);
370 }
371
372 -DEFINE_Q35_MACHINE_AS_LATEST(11, 0);
372 +DEFINE_Q35_MACHINE_AS_LATEST(11, 1);
373 +
374 +static void pc_q35_machine_11_0_options(MachineClass *m)
375 +{
376 + pc_q35_machine_11_1_options(m);
377 + compat_props_add(m->compat_props, hw_compat_11_0, hw_compat_11_0_len);
378 + compat_props_add(m->compat_props, pc_compat_11_0, pc_compat_11_0_len);
379 +}
380 +
381 +DEFINE_Q35_MACHINE(11, 0);
382
383 static void pc_q35_machine_10_2_options(MachineClass *m)
384 {
hw/m68k/virt.c
+8 -1
@@ -367,10 +367,17 @@ type_init(virt_machine_register_types)
367 #define DEFINE_VIRT_MACHINE(major, minor) \
368 DEFINE_VIRT_MACHINE_IMPL(false, major, minor)
369
370 +static void virt_machine_11_1_options(MachineClass *mc)
371 +{
372 +}
373 +DEFINE_VIRT_MACHINE_AS_LATEST(11, 1)
374 +
375 static void virt_machine_11_0_options(MachineClass *mc)
376 {
377 + virt_machine_11_1_options(mc);
378 + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len);
379 }
373 -DEFINE_VIRT_MACHINE_AS_LATEST(11, 0)
380 +DEFINE_VIRT_MACHINE(11, 0)
381
382 static void virt_machine_10_2_options(MachineClass *mc)
383 {
hw/ppc/spapr.c
+13 -2
@@ -4760,15 +4760,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
4760 #define DEFINE_SPAPR_MACHINE(major, minor) \
4761 DEFINE_SPAPR_MACHINE_IMPL(false, major, minor)
4762
4763 +/*
4764 + * pseries-11.1
4765 + */
4766 +static void spapr_machine_11_1_class_options(MachineClass *mc)
4767 +{
4768 + /* Defaults for the latest behaviour inherited from the base class */
4769 +}
4770 +
4771 +DEFINE_SPAPR_MACHINE_AS_LATEST(11, 1);
4772 +
4773 /*
4774 * pseries-11.0
4775 */
4776 static void spapr_machine_11_0_class_options(MachineClass *mc)
4777 {
4768 - /* Defaults for the latest behaviour inherited from the base class */
4778 + spapr_machine_11_1_class_options(mc);
4779 + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len);
4780 }
4781
4771 -DEFINE_SPAPR_MACHINE_AS_LATEST(11, 0);
4782 +DEFINE_SPAPR_MACHINE(11, 0);
4783
4784 /*
4785 * pseries-10.2
hw/s390x/s390-virtio-ccw.c
+13 -1
@@ -907,14 +907,26 @@ static const TypeInfo ccw_machine_info = {
907 DEFINE_CCW_MACHINE_IMPL(false, major, minor)
908
909
910 +static void ccw_machine_11_1_instance_options(MachineState *machine)
911 +{
912 +}
913 +
914 +static void ccw_machine_11_1_class_options(MachineClass *mc)
915 +{
916 +}
917 +DEFINE_CCW_MACHINE_AS_LATEST(11, 1);
918 +
919 static void ccw_machine_11_0_instance_options(MachineState *machine)
920 {
921 + ccw_machine_11_1_instance_options(machine);
922 }
923
924 static void ccw_machine_11_0_class_options(MachineClass *mc)
925 {
926 + ccw_machine_11_1_class_options(mc);
927 + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len);
928 }
917 -DEFINE_CCW_MACHINE_AS_LATEST(11, 0);
929 +DEFINE_CCW_MACHINE(11, 0);
930
931 static void ccw_machine_10_2_instance_options(MachineState *machine)
932 {
include/hw/core/boards.h
+3
@@ -803,6 +803,9 @@ struct MachineState {
803 } \
804 } while (0)
805
806 +extern GlobalProperty hw_compat_11_0[];
807 +extern const size_t hw_compat_11_0_len;
808 +
809 extern GlobalProperty hw_compat_10_2[];
810 extern const size_t hw_compat_10_2_len;
811
include/hw/i386/pc.h
+3
@@ -208,6 +208,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size);
208 /* sgx.c */
209 void pc_machine_init_sgx_epc(PCMachineState *pcms);
210
211 +extern GlobalProperty pc_compat_11_0[];
212 +extern const size_t pc_compat_11_0_len;
213 +
214 extern GlobalProperty pc_compat_10_2[];
215 extern const size_t pc_compat_10_2_len;
216