From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>,
Harsh Prateek Bora <harshpb@linux.ibm.com>,
Zhao Liu <zhao1.liu@intel.com>, Gavin Shan <gshan@redhat.com>
Subject: [PULL 22/63] hw: Add compat machines for 9.1
Date: Tue, 23 Apr 2024 17:09:10 +0200 [thread overview]
Message-ID: <20240423150951.41600-23-pbonzini@redhat.com> (raw)
In-Reply-To: <20240423150951.41600-1-pbonzini@redhat.com>
Add 9.1 machine types for arm/i440fx/m68k/q35/s390x/spapr.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Cc: Gavin Shan <gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/boards.h | 3 +++
include/hw/i386/pc.h | 3 +++
hw/arm/virt.c | 11 +++++++++--
hw/core/machine.c | 3 +++
hw/i386/pc.c | 3 +++
hw/i386/pc_piix.c | 17 ++++++++++++++---
hw/i386/pc_q35.c | 14 ++++++++++++--
hw/m68k/virt.c | 11 +++++++++--
hw/ppc/spapr.c | 17 ++++++++++++++---
hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
10 files changed, 83 insertions(+), 13 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 8b8f6d5c00d..50e0cf4278e 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -425,6 +425,9 @@ struct MachineState {
} \
type_init(machine_initfn##_register_types)
+extern GlobalProperty hw_compat_9_0[];
+extern const size_t hw_compat_9_0_len;
+
extern GlobalProperty hw_compat_8_2[];
extern const size_t hw_compat_8_2_len;
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 27a68071d77..349f79df086 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -198,6 +198,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_0[];
+extern const size_t pc_compat_9_0_len;
+
extern GlobalProperty pc_compat_8_2[];
extern const size_t pc_compat_8_2_len;
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a9a913aeadb..c9119ef3847 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3223,10 +3223,17 @@ static void machvirt_machine_init(void)
}
type_init(machvirt_machine_init);
-static void virt_machine_9_0_options(MachineClass *mc)
+static void virt_machine_9_1_options(MachineClass *mc)
{
}
-DEFINE_VIRT_MACHINE_AS_LATEST(9, 0)
+DEFINE_VIRT_MACHINE_AS_LATEST(9, 1)
+
+static void virt_machine_9_0_options(MachineClass *mc)
+{
+ virt_machine_9_1_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+}
+DEFINE_VIRT_MACHINE(9, 0)
static void virt_machine_8_2_options(MachineClass *mc)
{
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 37ede0e7d4f..a92bec23147 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -33,6 +33,9 @@
#include "hw/virtio/virtio-iommu.h"
#include "audio/audio.h"
+GlobalProperty hw_compat_9_0[] = {};
+const size_t hw_compat_9_0_len = G_N_ELEMENTS(hw_compat_9_0);
+
GlobalProperty hw_compat_8_2[] = {
{ "migration", "zero-page-detection", "legacy"},
{ TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" },
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 5c21b0c4dbf..b0d818b2094 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -78,6 +78,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_0[] = {};
+const size_t pc_compat_9_0_len = G_N_ELEMENTS(pc_compat_9_0);
+
GlobalProperty pc_compat_8_2[] = {};
const size_t pc_compat_8_2_len = G_N_ELEMENTS(pc_compat_8_2);
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 18ba0766092..8850c49c66a 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -513,13 +513,26 @@ static void pc_i440fx_machine_options(MachineClass *m)
"Use a different south bridge than PIIX3");
}
-static void pc_i440fx_9_0_machine_options(MachineClass *m)
+static void pc_i440fx_9_1_machine_options(MachineClass *m)
{
pc_i440fx_machine_options(m);
m->alias = "pc";
m->is_default = true;
}
+DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", NULL,
+ pc_i440fx_9_1_machine_options);
+
+static void pc_i440fx_9_0_machine_options(MachineClass *m)
+{
+ pc_i440fx_9_1_machine_options(m);
+ m->alias = NULL;
+ m->is_default = false;
+
+ compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+ compat_props_add(m->compat_props, pc_compat_9_0, pc_compat_9_0_len);
+}
+
DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", NULL,
pc_i440fx_9_0_machine_options);
@@ -528,8 +541,6 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m)
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_i440fx_9_0_machine_options(m);
- m->alias = NULL;
- m->is_default = false;
compat_props_add(m->compat_props, hw_compat_8_2, hw_compat_8_2_len);
compat_props_add(m->compat_props, pc_compat_8_2, pc_compat_8_2_len);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index c7bc8a2041f..6e1180d4b60 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -365,12 +365,23 @@ static void pc_q35_machine_options(MachineClass *m)
pc_q35_compat_defaults, pc_q35_compat_defaults_len);
}
-static void pc_q35_9_0_machine_options(MachineClass *m)
+static void pc_q35_9_1_machine_options(MachineClass *m)
{
pc_q35_machine_options(m);
m->alias = "q35";
}
+DEFINE_Q35_MACHINE(v9_1, "pc-q35-9.1", NULL,
+ pc_q35_9_1_machine_options);
+
+static void pc_q35_9_0_machine_options(MachineClass *m)
+{
+ pc_q35_9_1_machine_options(m);
+ m->alias = NULL;
+ compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+ compat_props_add(m->compat_props, pc_compat_9_0, pc_compat_9_0_len);
+}
+
DEFINE_Q35_MACHINE(v9_0, "pc-q35-9.0", NULL,
pc_q35_9_0_machine_options);
@@ -378,7 +389,6 @@ static void pc_q35_8_2_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_q35_9_0_machine_options(m);
- m->alias = NULL;
m->max_cpus = 1024;
compat_props_add(m->compat_props, hw_compat_8_2, hw_compat_8_2_len);
compat_props_add(m->compat_props, pc_compat_8_2, pc_compat_8_2_len);
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index b8e5e102e6b..09bc9bdfefb 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -357,10 +357,17 @@ type_init(virt_machine_register_types)
} \
type_init(machvirt_machine_##major##_##minor##_init);
-static void virt_machine_9_0_options(MachineClass *mc)
+static void virt_machine_9_1_options(MachineClass *mc)
{
}
-DEFINE_VIRT_MACHINE(9, 0, true)
+DEFINE_VIRT_MACHINE(9, 1, true)
+
+static void virt_machine_9_0_options(MachineClass *mc)
+{
+ virt_machine_9_1_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+}
+DEFINE_VIRT_MACHINE(9, 0, false)
static void virt_machine_8_2_options(MachineClass *mc)
{
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index e9bc97fee08..36ada4d0baf 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4806,14 +4806,25 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
type_init(spapr_machine_register_##suffix)
/*
- * pseries-9.0
+ * pseries-9.1
*/
-static void spapr_machine_9_0_class_options(MachineClass *mc)
+static void spapr_machine_9_1_class_options(MachineClass *mc)
{
/* Defaults for the latest behaviour inherited from the base class */
}
-DEFINE_SPAPR_MACHINE(9_0, "9.0", true);
+DEFINE_SPAPR_MACHINE(9_1, "9.1", true);
+
+/*
+ * pseries-9.0
+ */
+static void spapr_machine_9_0_class_options(MachineClass *mc)
+{
+ spapr_machine_9_1_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len);
+}
+
+DEFINE_SPAPR_MACHINE(9_0, "9.0", false);
/*
* pseries-8.2
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index b1dcb3857f0..7cebbf6c02a 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -859,14 +859,26 @@ bool css_migration_enabled(void)
} \
type_init(ccw_machine_register_##suffix)
+static void ccw_machine_9_1_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_9_1_class_options(MachineClass *mc)
+{
+}
+DEFINE_CCW_MACHINE(9_1, "9.1", true);
+
static void ccw_machine_9_0_instance_options(MachineState *machine)
{
+ ccw_machine_9_1_instance_options(machine);
}
static void ccw_machine_9_0_class_options(MachineClass *mc)
{
+ ccw_machine_9_1_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len);
}
-DEFINE_CCW_MACHINE(9_0, "9.0", true);
+DEFINE_CCW_MACHINE(9_0, "9.0", false);
static void ccw_machine_8_2_instance_options(MachineState *machine)
{
--
2.44.0
next prev parent reply other threads:[~2024-04-23 15:14 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 15:08 [PULL 00/63] First batch of i386 and build system patch for QEMU 9.1 Paolo Bonzini
2024-04-23 15:08 ` [PULL 01/63] meson: do not link pixman automatically into all targets Paolo Bonzini
2024-04-23 15:08 ` [PULL 02/63] tests: only build plugins if TCG is enabled Paolo Bonzini
2024-04-23 15:08 ` [PULL 03/63] ebpf: Restrict to system emulation Paolo Bonzini
2024-04-23 15:08 ` [PULL 04/63] tests/unit: match some unit tests to corresponding feature switches Paolo Bonzini
2024-04-23 15:08 ` [PULL 05/63] yank: only build if needed Paolo Bonzini
2024-04-23 15:08 ` [PULL 06/63] util/qemu-config: Extract QMP commands to qemu-config-qmp.c Paolo Bonzini
2024-04-23 15:08 ` [PULL 07/63] hw/core: Move system emulation files to system_ss Paolo Bonzini
2024-04-23 15:08 ` [PULL 08/63] hw: Include minimal source set in user emulation build Paolo Bonzini
2024-04-23 15:08 ` [PULL 09/63] stubs: remove obsolete stubs Paolo Bonzini
2024-04-23 15:08 ` [PULL 10/63] hw/usb: move stubs out of stubs/ Paolo Bonzini
2024-04-23 15:08 ` [PULL 11/63] hw/virtio: " Paolo Bonzini
2024-08-03 2:29 ` Michael Tokarev
2024-09-05 16:27 ` Paolo Bonzini
2024-09-06 7:08 ` Michael Tokarev
2024-09-06 7:30 ` Paolo Bonzini
2024-04-23 15:09 ` [PULL 12/63] semihosting: " Paolo Bonzini
2024-04-23 15:09 ` [PULL 13/63] ramfb: " Paolo Bonzini
2024-04-23 15:09 ` [PULL 14/63] memory-device: " Paolo Bonzini
2024-04-23 15:09 ` [PULL 15/63] colo: " Paolo Bonzini
2024-04-23 15:09 ` [PULL 16/63] stubs: split record/replay stubs further Paolo Bonzini
2024-04-23 15:09 ` [PULL 17/63] stubs: include stubs only if needed Paolo Bonzini
2024-06-04 10:07 ` Daniel P. Berrangé
2024-06-05 14:46 ` Zhao Liu
2024-04-23 15:09 ` [PULL 18/63] stubs: move monitor_fdsets_cleanup with other fdset stubs Paolo Bonzini
2024-04-23 15:09 ` [PULL 19/63] vga: optimize computation of dirty memory region Paolo Bonzini
2024-04-23 15:09 ` [PULL 20/63] vga: move dirty memory region code together Paolo Bonzini
2024-04-23 15:09 ` [PULL 21/63] kvm: use configs/ definition to conditionalize debug support Paolo Bonzini
2024-04-23 15:09 ` Paolo Bonzini [this message]
2024-04-23 15:09 ` [PULL 23/63] target/i386: add guest-phys-bits cpu property Paolo Bonzini
2024-04-23 15:09 ` [PULL 24/63] kvm: add support for guest physical bits Paolo Bonzini
2024-04-23 15:09 ` [PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper Paolo Bonzini
2024-04-23 15:29 ` Xiaoyao Li
2024-04-23 15:09 ` [PULL 26/63] target/i386: Introduce Icelake-Server-v7 to enable TSX Paolo Bonzini
2024-04-23 15:09 ` [PULL 27/63] target/i386: Add new CPU model SierraForest Paolo Bonzini
2024-04-23 15:09 ` [PULL 28/63] target/i386: Export RFDS bit to guests Paolo Bonzini
2024-04-23 15:09 ` [PULL 29/63] pci-host/q35: Move PAM initialization above SMRAM initialization Paolo Bonzini
2025-08-12 14:20 ` Michael Tokarev
2025-08-12 14:40 ` Michael Tokarev
2024-04-23 15:09 ` [PULL 30/63] q35: Introduce smm_ranges property for q35-pci-host Paolo Bonzini
2025-08-12 14:45 ` Philippe Mathieu-Daudé
2025-08-12 15:27 ` Michael Tokarev
2025-09-17 14:23 ` Michael Tokarev
2025-09-18 9:20 ` Gerd Hoffmann
2025-09-18 9:27 ` Michael Tokarev
2025-09-18 10:25 ` Gerd Hoffmann
2024-04-23 15:09 ` [PULL 31/63] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled Paolo Bonzini
2024-04-23 15:09 ` [PULL 32/63] confidential guest support: Add kvm_init() and kvm_reset() in class Paolo Bonzini
2024-04-23 15:09 ` [PULL 33/63] i386/sev: Switch to use confidential_guest_kvm_init() Paolo Bonzini
2024-04-23 15:09 ` [PULL 34/63] ppc/pef: switch to use confidential_guest_kvm_init/reset() Paolo Bonzini
2024-04-23 15:09 ` [PULL 35/63] s390: Switch to use confidential_guest_kvm_init() Paolo Bonzini
2024-04-23 15:09 ` [PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import list Paolo Bonzini
2024-04-23 15:09 ` [PULL 37/63] scripts/update-linux-headers: Add bits.h to file imports Paolo Bonzini
2024-04-23 15:09 ` [PULL 38/63] linux-headers: update to current kvm/next Paolo Bonzini
2024-04-23 15:09 ` [PULL 39/63] runstate: skip initial CPU reset if reset is not actually possible Paolo Bonzini
2024-04-23 15:09 ` [PULL 40/63] KVM: track whether guest state is encrypted Paolo Bonzini
2024-04-23 15:09 ` [PULL 41/63] KVM: remove kvm_arch_cpu_check_are_resettable Paolo Bonzini
2024-04-23 15:09 ` [PULL 42/63] target/i386: introduce x86-confidential-guest Paolo Bonzini
2024-04-23 15:09 ` [PULL 43/63] target/i386: Implement mc->kvm_type() to get VM type Paolo Bonzini
2024-04-24 8:36 ` Xiaoyao Li
2024-04-23 15:09 ` [PULL 44/63] target/i386: SEV: use KVM_SEV_INIT2 if possible Paolo Bonzini
2024-04-23 15:09 ` [PULL 45/63] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects Paolo Bonzini
2024-04-23 15:09 ` [PULL 46/63] hw/i386/sev: Use legacy SEV VM types for older machine types Paolo Bonzini
2024-04-23 15:09 ` [PULL 47/63] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory() Paolo Bonzini
2024-04-23 15:09 ` [PULL 48/63] kvm: Introduce support for memory_attributes Paolo Bonzini
2024-04-23 15:09 ` [PULL 49/63] RAMBlock: Add support of KVM private guest memfd Paolo Bonzini
2024-04-23 15:09 ` [PULL 50/63] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot Paolo Bonzini
2024-04-23 15:09 ` [PULL 51/63] kvm/memory: Make memory type private by default if it has guest memfd backend Paolo Bonzini
2024-04-23 15:09 ` [PULL 52/63] HostMem: Add mechanism to opt in kvm guest memfd via MachineState Paolo Bonzini
2024-04-23 15:09 ` [PULL 53/63] RAMBlock: make guest_memfd require uncoordinated discard Paolo Bonzini
2024-04-23 15:09 ` [PULL 54/63] physmem: Introduce ram_block_discard_guest_memfd_range() Paolo Bonzini
2024-04-23 15:09 ` [PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT Paolo Bonzini
2024-04-26 13:40 ` Peter Maydell
2024-04-30 19:06 ` Paolo Bonzini
2024-04-23 15:09 ` [PULL 56/63] kvm/tdx: Don't complain when converting vMMIO region to shared Paolo Bonzini
2024-04-23 15:09 ` [PULL 57/63] kvm/tdx: Ignore memory conversion to shared of unassigned region Paolo Bonzini
2024-04-23 15:09 ` [PULL 58/63] target/i386/host-cpu: Consolidate the use of warn_report_once() Paolo Bonzini
2024-04-23 15:09 ` [PULL 59/63] target/i386/cpu: " Paolo Bonzini
2024-04-23 15:09 ` [PULL 60/63] target/i386/cpu: Merge the warning and error messages for AMD HT check Paolo Bonzini
2024-04-23 15:09 ` [PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report_once() Paolo Bonzini
2024-04-23 15:09 ` [PULL 62/63] pythondeps.toml: warn about updates needed to docs/requirements.txt Paolo Bonzini
2024-04-23 15:09 ` [PULL 63/63] target/i386/translate.c: always write 32-bits for SGDT and SIDT Paolo Bonzini
2024-04-24 4:26 ` [PULL 00/63] First batch of i386 and build system patch for QEMU 9.1 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240423150951.41600-23-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=cohuck@redhat.com \
--cc=gshan@redhat.com \
--cc=harshpb@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).