* [PATCH for-10.0 0/2] compat machines for 10.0
@ 2024-11-26 10:30 Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 1/2] hw/i386: define _AS_LATEST() macros for machine types Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 2/2] hw: add compat machines for 10.0 Cornelia Huck
0 siblings, 2 replies; 4+ messages in thread
From: Cornelia Huck @ 2024-11-26 10:30 UTC (permalink / raw)
To: Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Zhao Liu, Paolo Bonzini,
Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
Nicholas Piggin, Daniel Henrique Barboza, Harsh Prateek Bora,
Thomas Huth, Halil Pasic, Christian Borntraeger, Eric Farman,
David Hildenbrand, Ilya Leoshkevich
Cc: qemu-arm, qemu-devel, qemu-ppc, qemu-s390x,
Daniel P. Berrangé, Cornelia Huck
It's that time of the year^Wrelease cycle again, so here are the machine
types for the next release. I'm also including the _AS_LATEST() patch
that had apparently fallen through the cracks.
Cornelia Huck (1):
hw: add compat machines for 10.0
Daniel P. Berrangé (1):
hw/i386: define _AS_LATEST() macros for machine types
hw/arm/virt.c | 9 ++++++++-
hw/core/machine.c | 3 +++
hw/i386/pc.c | 3 +++
hw/i386/pc_piix.c | 20 ++++++++++++++------
hw/i386/pc_q35.c | 20 +++++++++++++++-----
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 | 7 ++++++-
10 files changed, 86 insertions(+), 17 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH for-10.0 1/2] hw/i386: define _AS_LATEST() macros for machine types
2024-11-26 10:30 [PATCH for-10.0 0/2] compat machines for 10.0 Cornelia Huck
@ 2024-11-26 10:30 ` Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 2/2] hw: add compat machines for 10.0 Cornelia Huck
1 sibling, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2024-11-26 10:30 UTC (permalink / raw)
To: Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Zhao Liu, Paolo Bonzini,
Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
Nicholas Piggin, Daniel Henrique Barboza, Harsh Prateek Bora,
Thomas Huth, Halil Pasic, Christian Borntraeger, Eric Farman,
David Hildenbrand, Ilya Leoshkevich
Cc: qemu-arm, qemu-devel, qemu-ppc, qemu-s390x,
Daniel P. Berrangé, Cornelia Huck
From: Daniel P. Berrangé <berrange@redhat.com>
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@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240910163041.3764176-1-berrange@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@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 2bf6865d405e..495367617009 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 8319b6d45ee3..42bdedbaa403 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 14ee06287da3..890427c56ed2 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__) = \
{ \
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH for-10.0 2/2] hw: add compat machines for 10.0
2024-11-26 10:30 [PATCH for-10.0 0/2] compat machines for 10.0 Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 1/2] hw/i386: define _AS_LATEST() macros for machine types Cornelia Huck
@ 2024-11-26 10:30 ` Cornelia Huck
2024-12-04 6:28 ` Thomas Huth
1 sibling, 1 reply; 4+ messages in thread
From: Cornelia Huck @ 2024-11-26 10:30 UTC (permalink / raw)
To: Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Zhao Liu, Paolo Bonzini,
Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
Nicholas Piggin, Daniel Henrique Barboza, Harsh Prateek Bora,
Thomas Huth, Halil Pasic, Christian Borntraeger, Eric Farman,
David Hildenbrand, Ilya Leoshkevich
Cc: qemu-arm, qemu-devel, qemu-ppc, qemu-s390x,
Daniel P. Berrangé, Cornelia Huck
Add 10.0 machine types for arm/i440fx/m68k/q35/s390x/spapr.
Signed-off-by: Cornelia Huck <cohuck@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 1a381e9a2bd7..3bd9dd0f863c 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 a35c4a8faecb..6b8b0353ff0a 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 317aaca25a06..99b9b105e26d 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 495367617009..e4365cbdb0a4 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 42bdedbaa403..bbbdacda8e4a 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 ea5c4a5a570b..d0a7a6bfe241 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 5c02037c5644..167bbe6d1bef 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 fe03f716f314..67ae34aead90 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 36fbb9b59df8..7456889c37eb 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 890427c56ed2..1b26a417bd45 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;
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH for-10.0 2/2] hw: add compat machines for 10.0
2024-11-26 10:30 ` [PATCH for-10.0 2/2] hw: add compat machines for 10.0 Cornelia Huck
@ 2024-12-04 6:28 ` Thomas Huth
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-12-04 6:28 UTC (permalink / raw)
To: Cornelia Huck, Peter Maydell, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Zhao Liu, Paolo Bonzini,
Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
Nicholas Piggin, Daniel Henrique Barboza, Harsh Prateek Bora,
Halil Pasic, Christian Borntraeger, Eric Farman,
David Hildenbrand, Ilya Leoshkevich
Cc: qemu-arm, qemu-devel, qemu-ppc, qemu-s390x,
Daniel P. Berrangé
On 26/11/2024 11.30, Cornelia Huck wrote:
> Add 10.0 machine types for arm/i440fx/m68k/q35/s390x/spapr.
>
> Signed-off-by: Cornelia Huck <cohuck@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(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-04 6:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-26 10:30 [PATCH for-10.0 0/2] compat machines for 10.0 Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 1/2] hw/i386: define _AS_LATEST() macros for machine types Cornelia Huck
2024-11-26 10:30 ` [PATCH for-10.0 2/2] hw: add compat machines for 10.0 Cornelia Huck
2024-12-04 6:28 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).