hw: add compat machines for 11.2
Add 11.2 machine types for arm/i440fx/loongarch/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Link: https://lore.kernel.org/qemu-devel/20260723163806.368127-1-cohuck@redhat.com [farman@linux.ibm.com: fixup hw/core/machine.c hunk] Signed-off-by: Eric Farman <farman@linux.ibm.com>
Cornelia Huck committed
Jul 23, 2026 at 18:38 UTC
93676b24721135ae965169dd5797d37a5e022939
11 files changed
+85
-11
hw/arm/virt.c
+8
-1
@@ -4441,10 +4441,17 @@ static void machvirt_machine_init(void)
4441
}
4442
type_init(machvirt_machine_init);
4443
4444
+static void virt_machine_11_2_options(MachineClass *mc)
4445
+{
4446
+}
4447
+DEFINE_VIRT_MACHINE_AS_LATEST(11, 2)
4448
+
4449
static void virt_machine_11_1_options(MachineClass *mc)
4450
{
4451
+ virt_machine_11_2_options(mc);
4452
+ compat_props_add(mc->compat_props, hw_compat_11_1, hw_compat_11_1_len);
4453
}
4447
-DEFINE_VIRT_MACHINE_AS_LATEST(11, 1)
4454
+DEFINE_VIRT_MACHINE(11, 1)
4455
4456
static void virt_machine_11_0_options(MachineClass *mc)
4457
{
hw/core/machine.c
+3
@@ -40,6 +40,9 @@
40
#include "qemu/audio.h"
41
#include "hw/arm/smmuv3.h"
42
43
+GlobalProperty hw_compat_11_1[] = {};
44
+const size_t hw_compat_11_1_len = G_N_ELEMENTS(hw_compat_11_1);
45
+
46
GlobalProperty hw_compat_11_0[] = {
47
{ "virtio-mmio", VIRTIO_QUEUE_SIZE_OVERRIDE, "1024" },
48
{ "chardev-vc", "encoding", "cp437" },
hw/i386/pc.c
+3
@@ -74,6 +74,9 @@
74
#include "hw/xen/xen-bus.h"
75
#endif
76
77
+GlobalProperty pc_compat_11_1[] = {};
78
+const size_t pc_compat_11_1_len = G_N_ELEMENTS(pc_compat_11_1);
79
+
80
GlobalProperty pc_compat_11_0[] = {};
81
const size_t pc_compat_11_0_len = G_N_ELEMENTS(pc_compat_11_0);
82
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_1_options(MachineClass *m)
431
+static void pc_i440fx_machine_11_2_options(MachineClass *m)
432
{
433
pc_i440fx_machine_options(m);
434
}
435
436
-DEFINE_I440FX_MACHINE_AS_LATEST(11, 1);
436
+DEFINE_I440FX_MACHINE_AS_LATEST(11, 2);
437
+
438
+static void pc_i440fx_machine_11_1_options(MachineClass *m)
439
+{
440
+ pc_i440fx_machine_11_2_options(m);
441
+ compat_props_add(m->compat_props, hw_compat_11_1, hw_compat_11_1_len);
442
+ compat_props_add(m->compat_props, pc_compat_11_1, pc_compat_11_1_len);
443
+}
444
+
445
+DEFINE_I440FX_MACHINE(11, 1);
446
447
static void pc_i440fx_machine_11_0_options(MachineClass *m)
448
{
hw/i386/pc_q35.c
+11
-2
@@ -383,12 +383,21 @@ static void pc_q35_machine_options(MachineClass *m)
383
pc_q35_compat_defaults, pc_q35_compat_defaults_len);
384
}
385
386
-static void pc_q35_machine_11_1_options(MachineClass *m)
386
+static void pc_q35_machine_11_2_options(MachineClass *m)
387
{
388
pc_q35_machine_options(m);
389
}
390
391
-DEFINE_Q35_MACHINE_AS_LATEST(11, 1);
391
+DEFINE_Q35_MACHINE_AS_LATEST(11, 2);
392
+
393
+static void pc_q35_machine_11_1_options(MachineClass *m)
394
+{
395
+ pc_q35_machine_11_2_options(m);
396
+ compat_props_add(m->compat_props, hw_compat_11_1, hw_compat_11_1_len);
397
+ compat_props_add(m->compat_props, pc_compat_11_1, pc_compat_11_1_len);
398
+}
399
+
400
+DEFINE_Q35_MACHINE(11, 1);
401
402
static void pc_q35_machine_11_0_options(MachineClass *m)
403
{
hw/loongarch/virt.c
+9
-2
@@ -1465,7 +1465,6 @@ static void virt_class_init(ObjectClass *oc, const void *data)
1465
mc->default_ram_id = "loongarch.ram";
1466
mc->desc = "QEMU LoongArch Virtual Machine";
1467
mc->max_cpus = LOONGARCH_MAX_CPUS;
1468
- mc->is_default = 1;
1468
mc->default_kernel_irqchip_split = false;
1469
mc->block_default_type = IF_VIRTIO;
1470
mc->default_boot_order = "c";
@@ -1546,6 +1545,7 @@ static void virt_class_init(ObjectClass *oc, const void *data)
1545
MACHINE_VER_DEPRECATION(__VA_ARGS__); \
1546
if (latest) { \
1547
mc->alias = "virt"; \
1548
+ mc->is_default = true; \
1549
} \
1550
} \
1551
static const TypeInfo MACHINE_VER_SYM(info, virt, __VA_ARGS__) = \
@@ -1600,7 +1600,14 @@ static void machvirt_machine_init(void)
1600
1601
type_init(machvirt_machine_init);
1602
1603
+static void virt_machine_11_2_options(MachineClass *mc)
1604
+{
1605
+}
1606
+DEFINE_VIRT_MACHINE_AS_LATEST(11, 2)
1607
+
1608
static void virt_machine_11_1_options(MachineClass *mc)
1609
{
1610
+ virt_machine_11_2_options(mc);
1611
+ compat_props_add(mc->compat_props, hw_compat_11_1, hw_compat_11_1_len);
1612
}
1606
-DEFINE_VIRT_MACHINE_AS_LATEST(11, 1)
1613
+DEFINE_VIRT_MACHINE(11, 1)
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_2_options(MachineClass *mc)
371
+{
372
+}
373
+DEFINE_VIRT_MACHINE_AS_LATEST(11, 2)
374
+
375
static void virt_machine_11_1_options(MachineClass *mc)
376
{
377
+ virt_machine_11_2_options(mc);
378
+ compat_props_add(mc->compat_props, hw_compat_11_1, hw_compat_11_1_len);
379
}
373
-DEFINE_VIRT_MACHINE_AS_LATEST(11, 1)
380
+DEFINE_VIRT_MACHINE(11, 1)
381
382
static void virt_machine_11_0_options(MachineClass *mc)
383
{
hw/ppc/spapr.c
+13
-2
@@ -4763,15 +4763,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
4763
#define DEFINE_SPAPR_MACHINE(major, minor) \
4764
DEFINE_SPAPR_MACHINE_IMPL(false, major, minor)
4765
4766
+/*
4767
+ * pseries-11.2
4768
+ */
4769
+static void spapr_machine_11_2_class_options(MachineClass *mc)
4770
+{
4771
+ /* Defaults for the latest behaviour inherited from the base class */
4772
+}
4773
+
4774
+DEFINE_SPAPR_MACHINE_AS_LATEST(11, 2);
4775
+
4776
/*
4777
* pseries-11.1
4778
*/
4779
static void spapr_machine_11_1_class_options(MachineClass *mc)
4780
{
4771
- /* Defaults for the latest behaviour inherited from the base class */
4781
+ spapr_machine_11_2_class_options(mc);
4782
+ compat_props_add(mc->compat_props, hw_compat_11_1, hw_compat_11_1_len);
4783
}
4784
4774
-DEFINE_SPAPR_MACHINE_AS_LATEST(11, 1);
4785
+DEFINE_SPAPR_MACHINE(11, 1);
4786
4787
/*
4788
* pseries-11.0
hw/s390x/s390-virtio-ccw.c
+13
-1
@@ -925,14 +925,26 @@ static const TypeInfo ccw_machine_info = {
925
DEFINE_CCW_MACHINE_IMPL(false, major, minor)
926
927
928
+static void ccw_machine_11_2_instance_options(MachineState *machine)
929
+{
930
+}
931
+
932
+static void ccw_machine_11_2_class_options(MachineClass *mc)
933
+{
934
+}
935
+DEFINE_CCW_MACHINE_AS_LATEST(11, 2);
936
+
937
static void ccw_machine_11_1_instance_options(MachineState *machine)
938
{
939
+ ccw_machine_11_2_instance_options(machine);
940
}
941
942
static void ccw_machine_11_1_class_options(MachineClass *mc)
943
{
944
+ ccw_machine_11_2_class_options(mc);
945
+ compat_props_add(mc->compat_props, hw_compat_11_1, hw_compat_11_1_len);
946
}
935
-DEFINE_CCW_MACHINE_AS_LATEST(11, 1);
947
+DEFINE_CCW_MACHINE(11, 1);
948
949
static void ccw_machine_11_0_instance_options(MachineState *machine)
950
{
include/hw/core/boards.h
+3
@@ -815,6 +815,9 @@ compat_props_add(GPtrArray *arr,
815
}
816
}
817
818
+extern GlobalProperty hw_compat_11_1[];
819
+extern const size_t hw_compat_11_1_len;
820
+
821
extern GlobalProperty hw_compat_11_0[];
822
extern const size_t hw_compat_11_0_len;
823
include/hw/i386/pc.h
+3
@@ -209,6 +209,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size);
209
/* sgx.c */
210
void pc_machine_init_sgx_epc(PCMachineState *pcms);
211
212
+extern GlobalProperty pc_compat_11_1[];
213
+extern const size_t pc_compat_11_1_len;
214
+
215
extern GlobalProperty pc_compat_11_0[];
216
extern const size_t pc_compat_11_0_len;
217