[PATCH pve-qemu 1/1] add fake 10.0

Alexandre Derumier alexandre.derumier at groupe-cyllene.com
Tue Jun 3 09:55:36 CEST 2025


Signed-off-by: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
---
 debian/changelog                              |   6 +
 .../extra/0001-bump-version-to-10.0.0.patch   |  19 ++
 ...438a42f7a178504347456b9e50e3d2c50478.patch | 247 ++++++++++++++++++
 ...b0606879ddeddf04bcf8440aabcfe1393b9c.patch | 120 +++++++++
 debian/patches/series                         |   3 +
 5 files changed, 395 insertions(+)
 create mode 100644 debian/patches/extra/0001-bump-version-to-10.0.0.patch
 create mode 100644 debian/patches/extra/0a7c438a42f7a178504347456b9e50e3d2c50478.patch
 create mode 100644 debian/patches/extra/7956b0606879ddeddf04bcf8440aabcfe1393b9c.patch

diff --git a/debian/changelog b/debian/changelog
index f83e130..c103a8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pve-qemu-kvm (10.0.0-1) bookworm; urgency=medium
+
+  * fake 10.0.0 for blockdevtest
+
+ -- Proxmox Support Team <support at proxmox.com>  Fri, 30 Apr 2025 16:15:58 +0200
+
 pve-qemu-kvm (9.2.0-5) bookworm; urgency=medium
 
   * pve backup: backup-access api: simplify bitmap logic
diff --git a/debian/patches/extra/0001-bump-version-to-10.0.0.patch b/debian/patches/extra/0001-bump-version-to-10.0.0.patch
new file mode 100644
index 0000000..9b36046
--- /dev/null
+++ b/debian/patches/extra/0001-bump-version-to-10.0.0.patch
@@ -0,0 +1,19 @@
+From fb47d062f660bec03ae460df07efd267fc55ce0c Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
+Date: Mon, 26 May 2025 14:18:53 +0200
+Subject: [PATCH] bump version to 10.0.0
+
+---
+ VERSION | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/VERSION b/VERSION
+index deeb3d6..a13e7b9 100644
+--- a/VERSION
++++ b/VERSION
+@@ -1 +1 @@
+-9.2.0
++10.0.0
+-- 
+2.39.5
+
diff --git a/debian/patches/extra/0a7c438a42f7a178504347456b9e50e3d2c50478.patch b/debian/patches/extra/0a7c438a42f7a178504347456b9e50e3d2c50478.patch
new file mode 100644
index 0000000..e8b644d
--- /dev/null
+++ b/debian/patches/extra/0a7c438a42f7a178504347456b9e50e3d2c50478.patch
@@ -0,0 +1,247 @@
+From 0a7c438a42f7a178504347456b9e50e3d2c50478 Mon Sep 17 00:00:00 2001
+From: Cornelia Huck <cohuck at redhat.com>
+Date: Tue, 26 Nov 2024 11:30:05 +0100
+Subject: [PATCH] hw: add compat machines for 10.0
+
+Add 10.0 machine types for arm/i440fx/m68k/q35/s390x/spapr.
+
+Signed-off-by: Cornelia Huck <cohuck at redhat.com>
+Reviewed-by: Thomas Huth <thuth at redhat.com>
+Message-ID: <20241126103005.3794748-3-cohuck at redhat.com>
+Signed-off-by: Thomas Huth <thuth at redhat.com>
+---
+ hw/arm/virt.c              |  9 ++++++++-
+ hw/core/machine.c          |  3 +++
+ hw/i386/pc.c               |  3 +++
+ hw/i386/pc_piix.c          | 13 +++++++++++--
+ hw/i386/pc_q35.c           | 13 +++++++++++--
+ hw/m68k/virt.c             |  9 ++++++++-
+ hw/ppc/spapr.c             | 15 +++++++++++++--
+ hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
+ include/hw/boards.h        |  3 +++
+ include/hw/i386/pc.h       |  3 +++
+ 10 files changed, 76 insertions(+), 9 deletions(-)
+
+diff --git a/hw/arm/virt.c b/hw/arm/virt.c
+index 1a381e9a2bd71..3bd9dd0f863cf 100644
+--- a/hw/arm/virt.c
++++ b/hw/arm/virt.c
+@@ -3353,10 +3353,17 @@ static void machvirt_machine_init(void)
+ }
+ type_init(machvirt_machine_init);
+ 
++static void virt_machine_10_0_options(MachineClass *mc)
++{
++}
++DEFINE_VIRT_MACHINE_AS_LATEST(10, 0)
++
+ static void virt_machine_9_2_options(MachineClass *mc)
+ {
++    virt_machine_10_0_options(mc);
++    compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len);
+ }
+-DEFINE_VIRT_MACHINE_AS_LATEST(9, 2)
++DEFINE_VIRT_MACHINE(9, 2)
+ 
+ static void virt_machine_9_1_options(MachineClass *mc)
+ {
+diff --git a/hw/core/machine.c b/hw/core/machine.c
+index f29fe959647f5..e6900b43efa2e 100644
+--- a/hw/core/machine.c
++++ b/hw/core/machine.c
+@@ -36,6 +36,9 @@
+ #include "hw/virtio/virtio-iommu.h"
+ #include "audio/audio.h"
+ 
++GlobalProperty hw_compat_9_2[] = {};
++const size_t hw_compat_9_2_len = G_N_ELEMENTS(hw_compat_9_2);
++
+ GlobalProperty hw_compat_9_1[] = {
+     { TYPE_PCI_DEVICE, "x-pcie-ext-tag", "false" },
+ };
+diff --git a/hw/i386/pc.c b/hw/i386/pc.c
+index 317aaca25a06b..99b9b105e26df 100644
+--- a/hw/i386/pc.c
++++ b/hw/i386/pc.c
+@@ -79,6 +79,9 @@
+     { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
+     { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },
+ 
++GlobalProperty pc_compat_9_2[] = {};
++const size_t pc_compat_9_2_len = G_N_ELEMENTS(pc_compat_9_2);
++
+ GlobalProperty pc_compat_9_1[] = {
+     { "ICH9-LPC", "x-smi-swsmi-timer", "off" },
+     { "ICH9-LPC", "x-smi-periodic-timer", "off" },
+diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
+index 4953676170099..e4365cbdb0a48 100644
+--- a/hw/i386/pc_piix.c
++++ b/hw/i386/pc_piix.c
+@@ -477,12 +477,21 @@ static void pc_i440fx_machine_options(MachineClass *m)
+                                      "Use a different south bridge than PIIX3");
+ }
+ 
+-static void pc_i440fx_machine_9_2_options(MachineClass *m)
++static void pc_i440fx_machine_10_0_options(MachineClass *m)
+ {
+     pc_i440fx_machine_options(m);
+ }
+ 
+-DEFINE_I440FX_MACHINE_AS_LATEST(9, 2);
++DEFINE_I440FX_MACHINE_AS_LATEST(10, 0);
++
++static void pc_i440fx_machine_9_2_options(MachineClass *m)
++{
++    pc_i440fx_machine_10_0_options(m);
++    compat_props_add(m->compat_props, hw_compat_9_2, hw_compat_9_2_len);
++    compat_props_add(m->compat_props, pc_compat_9_2, pc_compat_9_2_len);
++}
++
++DEFINE_I440FX_MACHINE(9, 2);
+ 
+ static void pc_i440fx_machine_9_1_options(MachineClass *m)
+ {
+diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
+index 42bdedbaa403a..bbbdacda8e4ac 100644
+--- a/hw/i386/pc_q35.c
++++ b/hw/i386/pc_q35.c
+@@ -359,12 +359,21 @@ static void pc_q35_machine_options(MachineClass *m)
+                      pc_q35_compat_defaults, pc_q35_compat_defaults_len);
+ }
+ 
+-static void pc_q35_machine_9_2_options(MachineClass *m)
++static void pc_q35_machine_10_0_options(MachineClass *m)
+ {
+     pc_q35_machine_options(m);
+ }
+ 
+-DEFINE_Q35_MACHINE_AS_LATEST(9, 2);
++DEFINE_Q35_MACHINE_AS_LATEST(10, 0);
++
++static void pc_q35_machine_9_2_options(MachineClass *m)
++{
++    pc_q35_machine_10_0_options(m);
++    compat_props_add(m->compat_props, hw_compat_9_2, hw_compat_9_2_len);
++    compat_props_add(m->compat_props, pc_compat_9_2, pc_compat_9_2_len);
++}
++
++DEFINE_Q35_MACHINE(9, 2);
+ 
+ static void pc_q35_machine_9_1_options(MachineClass *m)
+ {
+diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
+index ea5c4a5a570bb..d0a7a6bfe2417 100644
+--- a/hw/m68k/virt.c
++++ b/hw/m68k/virt.c
+@@ -366,10 +366,17 @@ type_init(virt_machine_register_types)
+ #define DEFINE_VIRT_MACHINE(major, minor) \
+     DEFINE_VIRT_MACHINE_IMPL(false, major, minor)
+ 
++static void virt_machine_10_0_options(MachineClass *mc)
++{
++}
++DEFINE_VIRT_MACHINE_AS_LATEST(10, 0)
++
+ static void virt_machine_9_2_options(MachineClass *mc)
+ {
++    virt_machine_10_0_options(mc);
++    compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len);
+ }
+-DEFINE_VIRT_MACHINE_AS_LATEST(9, 2)
++DEFINE_VIRT_MACHINE(9, 2)
+ 
+ static void virt_machine_9_1_options(MachineClass *mc)
+ {
+diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
+index 0d4efaa0c091b..7251eea521dae 100644
+--- a/hw/ppc/spapr.c
++++ b/hw/ppc/spapr.c
+@@ -4732,15 +4732,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
+ #define DEFINE_SPAPR_MACHINE(major, minor) \
+     DEFINE_SPAPR_MACHINE_IMPL(false, major, minor)
+ 
++/*
++ * pseries-10.0
++ */
++static void spapr_machine_10_0_class_options(MachineClass *mc)
++{
++    /* Defaults for the latest behaviour inherited from the base class */
++}
++
++DEFINE_SPAPR_MACHINE_AS_LATEST(10, 0);
++
+ /*
+  * pseries-9.2
+  */
+ static void spapr_machine_9_2_class_options(MachineClass *mc)
+ {
+-    /* Defaults for the latest behaviour inherited from the base class */
++    spapr_machine_10_0_class_options(mc);
++    compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len);
+ }
+ 
+-DEFINE_SPAPR_MACHINE_AS_LATEST(9, 2);
++DEFINE_SPAPR_MACHINE(9, 2);
+ 
+ /*
+  * pseries-9.1
+diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
+index fe03f716f314d..67ae34aead90a 100644
+--- a/hw/s390x/s390-virtio-ccw.c
++++ b/hw/s390x/s390-virtio-ccw.c
+@@ -849,14 +849,26 @@ static const TypeInfo ccw_machine_info = {
+     DEFINE_CCW_MACHINE_IMPL(false, major, minor)
+ 
+ 
++static void ccw_machine_10_0_instance_options(MachineState *machine)
++{
++}
++
++static void ccw_machine_10_0_class_options(MachineClass *mc)
++{
++}
++DEFINE_CCW_MACHINE_AS_LATEST(10, 0);
++
+ static void ccw_machine_9_2_instance_options(MachineState *machine)
+ {
++    ccw_machine_10_0_instance_options(machine);
+ }
+ 
+ static void ccw_machine_9_2_class_options(MachineClass *mc)
+ {
++    ccw_machine_10_0_class_options(mc);
++    compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len);
+ }
+-DEFINE_CCW_MACHINE_AS_LATEST(9, 2);
++DEFINE_CCW_MACHINE(9, 2);
+ 
+ static void ccw_machine_9_1_instance_options(MachineState *machine)
+ {
+diff --git a/include/hw/boards.h b/include/hw/boards.h
+index 36fbb9b59df86..7456889c37eb2 100644
+--- a/include/hw/boards.h
++++ b/include/hw/boards.h
+@@ -756,6 +756,9 @@ struct MachineState {
+     } \
+     type_init(machine_initfn##_register_types)
+ 
++extern GlobalProperty hw_compat_9_2[];
++extern const size_t hw_compat_9_2_len;
++
+ extern GlobalProperty hw_compat_9_1[];
+ extern const size_t hw_compat_9_1_len;
+ 
+diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
+index 890427c56ed25..1b26a417bd45a 100644
+--- a/include/hw/i386/pc.h
++++ b/include/hw/i386/pc.h
+@@ -215,6 +215,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size);
+ /* sgx.c */
+ void pc_machine_init_sgx_epc(PCMachineState *pcms);
+ 
++extern GlobalProperty pc_compat_9_2[];
++extern const size_t pc_compat_9_2_len;
++
+ extern GlobalProperty pc_compat_9_1[];
+ extern const size_t pc_compat_9_1_len;
+ 
diff --git a/debian/patches/extra/7956b0606879ddeddf04bcf8440aabcfe1393b9c.patch b/debian/patches/extra/7956b0606879ddeddf04bcf8440aabcfe1393b9c.patch
new file mode 100644
index 0000000..0212c82
--- /dev/null
+++ b/debian/patches/extra/7956b0606879ddeddf04bcf8440aabcfe1393b9c.patch
@@ -0,0 +1,120 @@
+From 7956b0606879ddeddf04bcf8440aabcfe1393b9c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange at redhat.com>
+Date: Tue, 26 Nov 2024 11:30:04 +0100
+Subject: [PATCH] hw/i386: define _AS_LATEST() macros for machine types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Follow the other architecture targets by adding extra macros for
+defining a versioned machine type as the latest. This reduces the
+size of the changes when introducing new machine types at the start
+of each release cycle.
+
+Reviewed-by: Philippe Mathieu-Daudé <philmd at linaro.org>
+Reviewed-by: Cornelia Huck <cohuck at redhat.com>
+Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
+Message-ID: <20240910163041.3764176-1-berrange at redhat.com>
+Signed-off-by: Cornelia Huck <cohuck at redhat.com>
+Message-ID: <20241126103005.3794748-2-cohuck at redhat.com>
+Signed-off-by: Thomas Huth <thuth at redhat.com>
+---
+ hw/i386/pc_piix.c    | 11 +++++------
+ hw/i386/pc_q35.c     | 11 ++++++-----
+ include/hw/i386/pc.h |  4 +++-
+ 3 files changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
+index 2bf6865d405eb..4953676170099 100644
+--- a/hw/i386/pc_piix.c
++++ b/hw/i386/pc_piix.c
+@@ -446,7 +446,10 @@ static void pc_i440fx_init(MachineState *machine)
+ }
+ 
+ #define DEFINE_I440FX_MACHINE(major, minor) \
+-    DEFINE_PC_VER_MACHINE(pc_i440fx, "pc-i440fx", pc_i440fx_init, major, minor);
++    DEFINE_PC_VER_MACHINE(pc_i440fx, "pc-i440fx", pc_i440fx_init, false, NULL, major, minor);
++
++#define DEFINE_I440FX_MACHINE_AS_LATEST(major, minor) \
++    DEFINE_PC_VER_MACHINE(pc_i440fx, "pc-i440fx", pc_i440fx_init, true, "pc", major, minor);
+ 
+ static void pc_i440fx_machine_options(MachineClass *m)
+ {
+@@ -477,17 +480,13 @@ static void pc_i440fx_machine_options(MachineClass *m)
+ static void pc_i440fx_machine_9_2_options(MachineClass *m)
+ {
+     pc_i440fx_machine_options(m);
+-    m->alias = "pc";
+-    m->is_default = true;
+ }
+ 
+-DEFINE_I440FX_MACHINE(9, 2);
++DEFINE_I440FX_MACHINE_AS_LATEST(9, 2);
+ 
+ static void pc_i440fx_machine_9_1_options(MachineClass *m)
+ {
+     pc_i440fx_machine_9_2_options(m);
+-    m->alias = NULL;
+-    m->is_default = false;
+     compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+     compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len);
+ }
+diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
+index 8319b6d45ee3f..42bdedbaa403a 100644
+--- a/hw/i386/pc_q35.c
++++ b/hw/i386/pc_q35.c
+@@ -327,10 +327,13 @@ static void pc_q35_init(MachineState *machine)
+ }
+ 
+ #define DEFINE_Q35_MACHINE(major, minor) \
+-    DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, major, minor);
++    DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, false, NULL, major, minor);
++
++#define DEFINE_Q35_MACHINE_AS_LATEST(major, minor) \
++    DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, false, "q35", major, minor);
+ 
+ #define DEFINE_Q35_MACHINE_BUGFIX(major, minor, micro) \
+-    DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, major, minor, micro);
++    DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, false, NULL, major, minor, micro);
+ 
+ static void pc_q35_machine_options(MachineClass *m)
+ {
+@@ -359,15 +362,13 @@ static void pc_q35_machine_options(MachineClass *m)
+ static void pc_q35_machine_9_2_options(MachineClass *m)
+ {
+     pc_q35_machine_options(m);
+-    m->alias = "q35";
+ }
+ 
+-DEFINE_Q35_MACHINE(9, 2);
++DEFINE_Q35_MACHINE_AS_LATEST(9, 2);
+ 
+ static void pc_q35_machine_9_1_options(MachineClass *m)
+ {
+     pc_q35_machine_9_2_options(m);
+-    m->alias = NULL;
+     compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+     compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len);
+ }
+diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
+index 14ee06287da34..890427c56ed25 100644
+--- a/include/hw/i386/pc.h
++++ b/include/hw/i386/pc.h
+@@ -320,7 +320,7 @@ extern const size_t pc_compat_2_3_len;
+     } \
+     type_init(pc_machine_init_##suffix)
+ 
+-#define DEFINE_PC_VER_MACHINE(namesym, namestr, initfn, ...) \
++#define DEFINE_PC_VER_MACHINE(namesym, namestr, initfn, isdefault, malias, ...) \
+     static void MACHINE_VER_SYM(init, namesym, __VA_ARGS__)( \
+         MachineState *machine) \
+     { \
+@@ -334,6 +334,8 @@ extern const size_t pc_compat_2_3_len;
+         MACHINE_VER_SYM(options, namesym, __VA_ARGS__)(mc); \
+         mc->init = MACHINE_VER_SYM(init, namesym, __VA_ARGS__); \
+         MACHINE_VER_DEPRECATION(__VA_ARGS__); \
++        mc->is_default = isdefault; \
++        mc->alias = malias; \
+     } \
+     static const TypeInfo MACHINE_VER_SYM(info, namesym, __VA_ARGS__) = \
+     { \
diff --git a/debian/patches/series b/debian/patches/series
index 18cd6ba..da35737 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,6 +9,9 @@ extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
 extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
 extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
 extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.patch
+extra/7956b0606879ddeddf04bcf8440aabcfe1393b9c.patch
+extra/0a7c438a42f7a178504347456b9e50e3d2c50478.patch
+extra/0001-bump-version-to-10.0.0.patch
 bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
 bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
 bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
-- 
2.39.5




More information about the pve-devel mailing list