* [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0
@ 2025-04-14 13:29 Thomas Huth
2025-04-14 13:29 ` [PATCH 1/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type Thomas Huth
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Thomas Huth @ 2025-04-14 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
These machine types are older than 6 years, so according to our new
support policy, it should be fine to remove them now in QEMU v10.1.
This series is
Based-on: <20250115073819.15452-1-thuth@redhat.com>
Thomas Huth (4):
hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type
hw/s390x: Remove the obsolete hpage_1m_allowed switch
hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type
hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 machine type
include/hw/s390x/s390-virtio-ccw.h | 4 --
hw/s390x/s390-virtio-ccw.c | 80 ------------------------------
target/s390x/gen-features.c | 43 ----------------
target/s390x/kvm/kvm.c | 6 ---
4 files changed, 133 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type
2025-04-14 13:29 [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0 Thomas Huth
@ 2025-04-14 13:29 ` Thomas Huth
2025-04-14 13:29 ` [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch Thomas Huth
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2025-04-14 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
From: Thomas Huth <thuth@redhat.com>
The s390-ccw-virtio-3.0 machine is older than 6 years, so according to
our machine support policy, it can be removed now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 42255921a80..370b03a0b97 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -1206,21 +1206,6 @@ static void ccw_machine_3_1_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(3, 1);
-static void ccw_machine_3_0_instance_options(MachineState *machine)
-{
- ccw_machine_3_1_instance_options(machine);
-}
-
-static void ccw_machine_3_0_class_options(MachineClass *mc)
-{
- S390CcwMachineClass *s390mc = S390_CCW_MACHINE_CLASS(mc);
-
- s390mc->hpage_1m_allowed = false;
- ccw_machine_3_1_class_options(mc);
- compat_props_add(mc->compat_props, hw_compat_3_0, hw_compat_3_0_len);
-}
-DEFINE_CCW_MACHINE(3, 0);
-
static void ccw_machine_register_types(void)
{
type_register_static(&ccw_machine_info);
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch
2025-04-14 13:29 [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0 Thomas Huth
2025-04-14 13:29 ` [PATCH 1/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type Thomas Huth
@ 2025-04-14 13:29 ` Thomas Huth
2025-04-14 16:20 ` Philippe Mathieu-Daudé
2025-04-14 13:29 ` [PATCH 3/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type Thomas Huth
2025-04-14 13:29 ` [PATCH 4/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 " Thomas Huth
3 siblings, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2025-04-14 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
From: Thomas Huth <thuth@redhat.com>
The s390-ccw-virtio-3.0 machine was the last one that used the
hpage_1m_allowed switch. Since we removed this machine type, we
can now remove the switch and the related code, too. This allows
us to get rid of the get_machine_class() hack and the big fat
warning comment there.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/hw/s390x/s390-virtio-ccw.h | 4 ----
hw/s390x/s390-virtio-ccw.c | 35 ------------------------------
target/s390x/kvm/kvm.c | 6 -----
3 files changed, 45 deletions(-)
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index 686d9497d20..321b26df308 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -53,11 +53,7 @@ struct S390CcwMachineClass {
MachineClass parent_class;
/*< public >*/
- bool hpage_1m_allowed;
int max_threads;
};
-/* 1M huge page mappings allowed by the machine */
-bool hpage_1m_allowed(void);
-
#endif
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 370b03a0b97..a4fe1e47150 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -746,39 +746,6 @@ static inline void machine_set_dea_key_wrap(Object *obj, bool value,
ms->dea_key_wrap = value;
}
-static S390CcwMachineClass *current_mc;
-
-/*
- * Get the class of the s390-ccw-virtio machine that is currently in use.
- * Note: libvirt is using the "none" machine to probe for the features of the
- * host CPU, so in case this is called with the "none" machine, the function
- * returns the TYPE_S390_CCW_MACHINE base class. In this base class, all the
- * various "*_allowed" variables are enabled, so that the *_allowed() wrappers
- * below return the correct default value for the "none" machine.
- *
- * Attention! Do *not* add additional new wrappers for CPU features via this
- * mechanism anymore. CPU features should be handled via the CPU models,
- * i.e. checking with s390_has_feat() should be sufficient.
- */
-static S390CcwMachineClass *get_machine_class(void)
-{
- if (unlikely(!current_mc)) {
- /*
- * No s390 ccw machine was instantiated, we are likely to
- * be called for the 'none' machine. The properties will
- * have their after-initialization values.
- */
- current_mc = S390_CCW_MACHINE_CLASS(
- object_class_by_name(TYPE_S390_CCW_MACHINE));
- }
- return current_mc;
-}
-
-bool hpage_1m_allowed(void)
-{
- return get_machine_class()->hpage_1m_allowed;
-}
-
static void machine_get_loadparm(Object *obj, Visitor *v,
const char *name, void *opaque,
Error **errp)
@@ -811,7 +778,6 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
S390CcwMachineClass *s390mc = S390_CCW_MACHINE_CLASS(mc);
- s390mc->hpage_1m_allowed = true;
s390mc->max_threads = 1;
mc->reset = s390_machine_reset;
mc->block_default_type = IF_VIRTIO;
@@ -883,7 +849,6 @@ static const TypeInfo ccw_machine_info = {
#define DEFINE_CCW_MACHINE_IMPL(latest, ...) \
static void MACHINE_VER_SYM(mach_init, ccw, __VA_ARGS__)(MachineState *mach) \
{ \
- current_mc = S390_CCW_MACHINE_CLASS(MACHINE_GET_CLASS(mach)); \
MACHINE_VER_SYM(instance_options, ccw, __VA_ARGS__)(mach); \
ccw_init(mach); \
} \
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 4d56e653ddf..fb14d2b182f 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -298,12 +298,6 @@ void kvm_s390_set_max_pagesize(uint64_t pagesize, Error **errp)
return;
}
- if (!hpage_1m_allowed()) {
- error_setg(errp, "This QEMU machine does not support huge page "
- "mappings");
- return;
- }
-
if (pagesize != 1 * MiB) {
error_setg(errp, "Memory backing with 2G pages was specified, "
"but KVM does not support this memory backing");
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type
2025-04-14 13:29 [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0 Thomas Huth
2025-04-14 13:29 ` [PATCH 1/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type Thomas Huth
2025-04-14 13:29 ` [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch Thomas Huth
@ 2025-04-14 13:29 ` Thomas Huth
2025-04-14 13:29 ` [PATCH 4/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 " Thomas Huth
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2025-04-14 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
From: Thomas Huth <thuth@redhat.com>
The s390-ccw-virtio-3.1 machine is older than 6 years, so according to
our machine support policy, it can be removed now. The corresponding
v3.1 CPU feature group can now be removed, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 16 ----------------
target/s390x/gen-features.c | 33 ---------------------------------
2 files changed, 49 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index a4fe1e47150..3e346749a06 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -1155,22 +1155,6 @@ static void ccw_machine_4_0_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(4, 0);
-static void ccw_machine_3_1_instance_options(MachineState *machine)
-{
- static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V3_1 };
- ccw_machine_4_0_instance_options(machine);
- s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH);
- s390_cpudef_group_featoff_greater(14, 1, S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF);
- s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
-}
-
-static void ccw_machine_3_1_class_options(MachineClass *mc)
-{
- ccw_machine_4_0_class_options(mc);
- compat_props_add(mc->compat_props, hw_compat_3_1, hw_compat_3_1_len);
-}
-DEFINE_CCW_MACHINE(3, 1);
-
static void ccw_machine_register_types(void)
{
type_register_static(&ccw_machine_info);
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 150e4d18438..0dbc5e181fb 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -844,38 +844,6 @@ static uint16_t default_GEN17_GA1[] = {
/* QEMU (CPU model) features */
-static uint16_t qemu_V3_1[] = {
- S390_FEAT_DAT_ENH,
- S390_FEAT_IDTE_SEGMENT,
- S390_FEAT_STFLE,
- S390_FEAT_SENSE_RUNNING_STATUS,
- S390_FEAT_EXTENDED_TRANSLATION_2,
- S390_FEAT_MSA,
- S390_FEAT_LONG_DISPLACEMENT,
- S390_FEAT_LONG_DISPLACEMENT_FAST,
- S390_FEAT_EXTENDED_IMMEDIATE,
- S390_FEAT_EXTENDED_TRANSLATION_3,
- S390_FEAT_ETF2_ENH,
- S390_FEAT_STORE_CLOCK_FAST,
- S390_FEAT_MOVE_WITH_OPTIONAL_SPEC,
- S390_FEAT_ETF3_ENH,
- S390_FEAT_EXTRACT_CPU_TIME,
- S390_FEAT_COMPARE_AND_SWAP_AND_STORE,
- S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2,
- S390_FEAT_GENERAL_INSTRUCTIONS_EXT,
- S390_FEAT_EXECUTE_EXT,
- S390_FEAT_SET_PROGRAM_PARAMETERS,
- S390_FEAT_FLOATING_POINT_SUPPORT_ENH,
- S390_FEAT_STFLE_45,
- S390_FEAT_STFLE_49,
- S390_FEAT_LOCAL_TLB_CLEARING,
- S390_FEAT_INTERLOCKED_ACCESS_2,
- S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
- S390_FEAT_ADAPTER_INT_SUPPRESSION,
- S390_FEAT_MSA_EXT_3,
- S390_FEAT_MSA_EXT_4,
-};
-
static uint16_t qemu_V4_0[] = {
/*
* Only BFP bits are implemented (HFP, DFP, PFPO and DIVIDE TO INTEGER not
@@ -1047,7 +1015,6 @@ static FeatGroupDefSpec FeatGroupDef[] = {
* QEMU (CPU model) features
*******************************/
static FeatGroupDefSpec QemuFeatDef[] = {
- QEMU_FEAT_INITIALIZER(V3_1),
QEMU_FEAT_INITIALIZER(V4_0),
QEMU_FEAT_INITIALIZER(V4_1),
QEMU_FEAT_INITIALIZER(V6_0),
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 machine type
2025-04-14 13:29 [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0 Thomas Huth
` (2 preceding siblings ...)
2025-04-14 13:29 ` [PATCH 3/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type Thomas Huth
@ 2025-04-14 13:29 ` Thomas Huth
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2025-04-14 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
From: Thomas Huth <thuth@redhat.com>
The s390-ccw-virtio-4.0 machine is older than 6 years, so according to
our machine support policy, it can be removed now. The corresponding
v4.0 CPU feature group can now be removed, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 14 --------------
target/s390x/gen-features.c | 10 ----------
2 files changed, 24 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3e346749a06..66fce9ff5e3 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -1141,20 +1141,6 @@ static void ccw_machine_4_1_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(4, 1);
-static void ccw_machine_4_0_instance_options(MachineState *machine)
-{
- static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V4_0 };
- ccw_machine_4_1_instance_options(machine);
- s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
-}
-
-static void ccw_machine_4_0_class_options(MachineClass *mc)
-{
- ccw_machine_4_1_class_options(mc);
- compat_props_add(mc->compat_props, hw_compat_4_0, hw_compat_4_0_len);
-}
-DEFINE_CCW_MACHINE(4, 0);
-
static void ccw_machine_register_types(void)
{
type_register_static(&ccw_machine_info);
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 0dbc5e181fb..b9672b2255c 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -844,15 +844,6 @@ static uint16_t default_GEN17_GA1[] = {
/* QEMU (CPU model) features */
-static uint16_t qemu_V4_0[] = {
- /*
- * Only BFP bits are implemented (HFP, DFP, PFPO and DIVIDE TO INTEGER not
- * implemented yet).
- */
- S390_FEAT_FLOATING_POINT_EXT,
- S390_FEAT_ZPCI,
-};
-
static uint16_t qemu_V4_1[] = {
S390_FEAT_STFLE_53,
S390_FEAT_VECTOR,
@@ -1015,7 +1006,6 @@ static FeatGroupDefSpec FeatGroupDef[] = {
* QEMU (CPU model) features
*******************************/
static FeatGroupDefSpec QemuFeatDef[] = {
- QEMU_FEAT_INITIALIZER(V4_0),
QEMU_FEAT_INITIALIZER(V4_1),
QEMU_FEAT_INITIALIZER(V6_0),
QEMU_FEAT_INITIALIZER(V6_2),
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch
2025-04-14 13:29 ` [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch Thomas Huth
@ 2025-04-14 16:20 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-14 16:20 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: qemu-s390x, Halil Pasic, Christian Borntraeger, Eric Farman
On 14/4/25 15:29, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> The s390-ccw-virtio-3.0 machine was the last one that used the
> hpage_1m_allowed switch. Since we removed this machine type, we
> can now remove the switch and the related code, too. This allows
> us to get rid of the get_machine_class() hack and the big fat
> warning comment there.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> include/hw/s390x/s390-virtio-ccw.h | 4 ----
> hw/s390x/s390-virtio-ccw.c | 35 ------------------------------
> target/s390x/kvm/kvm.c | 6 -----
> 3 files changed, 45 deletions(-)
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 370b03a0b97..a4fe1e47150 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -746,39 +746,6 @@ static inline void machine_set_dea_key_wrap(Object *obj, bool value,
> ms->dea_key_wrap = value;
> }
>
> -static S390CcwMachineClass *current_mc;
Wow, good cleanup.
> @@ -883,7 +849,6 @@ static const TypeInfo ccw_machine_info = {
> #define DEFINE_CCW_MACHINE_IMPL(latest, ...) \
> static void MACHINE_VER_SYM(mach_init, ccw, __VA_ARGS__)(MachineState *mach) \
> { \
> - current_mc = S390_CCW_MACHINE_CLASS(MACHINE_GET_CLASS(mach)); \
> MACHINE_VER_SYM(instance_options, ccw, __VA_ARGS__)(mach); \
> ccw_init(mach); \
> } \
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-14 16:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 13:29 [PATCH for-10.1 0/4] s390x: Remove deprecated machine types v3.0 up to v4.0 Thomas Huth
2025-04-14 13:29 ` [PATCH 1/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type Thomas Huth
2025-04-14 13:29 ` [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch Thomas Huth
2025-04-14 16:20 ` Philippe Mathieu-Daudé
2025-04-14 13:29 ` [PATCH 3/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type Thomas Huth
2025-04-14 13:29 ` [PATCH 4/4] hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 " 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).