aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-06-13 16:14:22 +0200
committerThomas Huth <thuth@redhat.com>2024-06-24 08:22:30 +0200
commitd6a7c3f44cf3f60c066dbf087ef79d4b12acc642 (patch)
treeb9523d6bd051fbd7a1daf7ef3b0803fa31288c5f /hw
parent3f6be80ca138d0c770b6b0709bc6f5acd6ad7476 (diff)
downloadqemu-d6a7c3f44cf3f60c066dbf087ef79d4b12acc642.zip
qemu-d6a7c3f44cf3f60c066dbf087ef79d4b12acc642.tar.gz
qemu-d6a7c3f44cf3f60c066dbf087ef79d4b12acc642.tar.bz2
target/s390x: Add a CONFIG switch to disable legacy CPUs
The oldest model that IBM still supports is the z13. Considering that each generation can "emulate" the previous two generations in hardware (via the "IBC" feature of the CPUs), this means that everything that is older than z114/196 is not an officially supported CPU model anymore. The Linux kernel still support the z10, so if we also take this into account, everything older than that can definitely be considered as a legacy CPU model. For downstream builds of QEMU, we would like to be able to disable these legacy CPUs in the build. Thus add a CONFIG switch that can be used to disable them (and old machine types that use them by default). Message-Id: <20240614125019.588928-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-virtio-ccw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3d0bc3e..cd063f8 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -47,6 +47,7 @@
#include "migration/blocker.h"
#include "qapi/visitor.h"
#include "hw/s390x/cpu-topology.h"
+#include CONFIG_DEVICES
static Error *pv_mig_blocker;
@@ -1126,6 +1127,8 @@ static void ccw_machine_2_12_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(2_12, "2.12", false);
+#ifdef CONFIG_S390X_LEGACY_CPUS
+
static void ccw_machine_2_11_instance_options(MachineState *machine)
{
static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_11 };
@@ -1272,6 +1275,8 @@ static void ccw_machine_2_4_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(2_4, "2.4", false);
+#endif
+
static void ccw_machine_register_types(void)
{
type_register_static(&ccw_machine_info);