s390x: Remove deprecated machine types v3.0 up to v4.0
cover s390x: Remove deprecated machine types v3.0 up to v4.0
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: <[email protected]>
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(-)
Signature · 1 line
2.49.0
PATCH 1/4 hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 machine type
From: Thomas Huth <[email protected]>
The s390-ccw-virtio-3.0 machine is older than 6 years, so according to our machine support policy, it can be removed now.
--- hw/s390x/s390-virtio-ccw.c | 15 --------------- 1 file changed, 15 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -15
@@ -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);
Signature · 1 line
2.49.0
PATCH 2/4 hw/s390x: Remove the obsolete hpage_1m_allowed switch
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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.
--- 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(-)
include/hw/s390x/s390-virtio-ccw.h +0 -4
@@ -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
hw/s390x/s390-virtio-ccw.c +0 -35
@@ -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); \ } \
target/s390x/kvm/kvm.c +0 -6
@@ -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" );
Signature · 1 line
2.49.0
Re: [PATCH 2/4] hw/s390x: Remove the obsolete hpage_1m_allowed switch
Quoted 20 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The s390-ccw-virtio-3.0 machine was the last one that used the
hpage_1m_allowedswitch. Since we removed this machine type, we can now remove the switch and the related code, too. This allows us to get rid of theget_machine_class()hack and the big fat warning comment there.Signed-off-by Thomas Huth <[email protected]>--- 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(-)hw/s390x/s390-virtio-ccw.c +0
-0
hw/s390x/s390-virtio-ccw.c static inline void machine_set_dea_key_wrap(Object *obj, bool value, · line 749
Quoted 4 lines
hw/s390x/s390-virtio-ccw.c +0
-1@@ -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.
hw/s390x/s390-virtio-ccw.c static const TypeInfo ccw_machine_info = { · line 854
Quoted 8 lines
hw/s390x/s390-virtio-ccw.c +0
-1@@ -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); \ } \
PATCH 3/4 hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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.
--- hw/s390x/s390-virtio-ccw.c | 16 ---------------- target/s390x/gen-features.c | 33 --------------------------------- 2 files changed, 49 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -16
@@ -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);
target/s390x/gen-features.c +0 -33
@@ -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 ),
Signature · 1 line
2.49.0
PATCH 4/4 hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 machine type
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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.
--- hw/s390x/s390-virtio-ccw.c | 14 -------------- target/s390x/gen-features.c | 10 ---------- 2 files changed, 24 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -14
@@ -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);
target/s390x/gen-features.c +0 -10
@@ -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 ),
Signature · 1 line
2.49.0