hw/s390x: Remove deprecated machine types 2.4 up to 2.8
cover hw/s390x: Remove deprecated machine types 2.4 up to 2.8
According to our support policy, we don't support machine types anymore that are older than 6 years, so we can remove the very old 2.x machine types now. Let's start by removing all s390-virtio-ccw machines up to version 2.8. (This also helps to get rid of the problem that has been described in: https://gitlab.com/qemu-project/qemu/-/issues/2213 )
Thomas Huth (10):
hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine
types
hw/s390x/s390-skeys: Remove the "migration-enabled" property hw/s390x/s390-virtio-ccw: Remove the deprecated 2.6 machine type hw/s390x: Remove the "ri_allowed" switch
hw/s390x/ipl: Remove the "iplbext_migration" property hw/s390x/css-bridge: Remove the "css_dev_path" property hw/s390x/s390-virtio-ccw: Remove the deprecated 2.7 machine type hw/s390x: Remove the cpu_model_allowed flag and related code hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type hw/s390x: Remove the "adapter_routes_max_batch" property from the flic
hw/s390x/ipl.h | 1 - include/hw/s390x/css-bridge.h | 1 - include/hw/s390x/s390-virtio-ccw.h | 6 -- include/hw/s390x/s390_flic.h | 2 - include/hw/s390x/storage-keys.h | 2 - hw/intc/s390_flic.c | 9 --- hw/s390x/css-bridge.c | 16 +---- hw/s390x/ipl.c | 10 --- hw/s390x/s390-skeys.c | 10 +-- hw/s390x/s390-virtio-ccw.c | 108 +---------------------------- hw/s390x/virtio-ccw.c | 5 +- target/s390x/kvm/kvm.c | 16 ++--- 12 files changed, 11 insertions(+), 175 deletions(-)
Signature · 1 line
2.47.1
PATCH 1/10 hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types
They are older than 6 years, so according to our machine support policy, they can be removed now.
This removes the requirements for the storage keys "migration-enabled" property which will be removed in the next patch. It also removes the code that sets "max_revision" to 0 for some CCW devices, but the relating code in virtio-ccw.c indicates that 0 could have also been in use for other machines types < 5.1, so further clean-up for code related to "max_revision" won't be done yet.
--- hw/s390x/s390-virtio-ccw.c | 37 ------------------------------------- 1 file changed, 37 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -37
@@ -1325,43 +1325,6 @@ static void ccw_machine_2_6_class_options(MachineClass *mc) }DEFINE_CCW_MACHINE (2 ,6 ); -static void ccw_machine_2_5_instance_options (MachineState *machine) -{ -ccw_machine_2_6_instance_options (machine); -} - -static void ccw_machine_2_5_class_options (MachineClass *mc) -{ -ccw_machine_2_6_class_options (mc); -compat_props_add (mc->compat_props, hw_compat_2_5, hw_compat_2_5_len); -} -DEFINE_CCW_MACHINE (2 ,5 ); - -static void ccw_machine_2_4_instance_options (MachineState *machine) -{ -ccw_machine_2_5_instance_options (machine); -} - -static void ccw_machine_2_4_class_options (MachineClass *mc) -{ -static GlobalProperty compat[] = { - {TYPE_S390_SKEYS ,"migration-enabled" ,"off" , }, - {"virtio-blk-ccw" ,"max_revision" ,"0" , }, - {"virtio-balloon-ccw" ,"max_revision" ,"0" , }, - {"virtio-serial-ccw" ,"max_revision" ,"0" , }, - {"virtio-9p-ccw" ,"max_revision" ,"0" , }, - {"virtio-rng-ccw" ,"max_revision" ,"0" , }, - {"virtio-net-ccw" ,"max_revision" ,"0" , }, - {"virtio-scsi-ccw" ,"max_revision" ,"0" , }, - {"vhost-scsi-ccw" ,"max_revision" ,"0" , }, - }; - -ccw_machine_2_5_class_options (mc); -compat_props_add (mc->compat_props, hw_compat_2_4, hw_compat_2_4_len); -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); -} -DEFINE_CCW_MACHINE (2 ,4 ); -#endif static void ccw_machine_register_types (void )
Signature · 1 line
2.47.1
Re: [PATCH 01/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types
Quoted 9 lines · Thomas Huth
They are older than 6 years, so according to our machine support policy, they can be removed now.
This removes the requirements for the storage keys "migration-enabled" property which will be removed in the next patch. It also removes the code that sets "
max_revision" to 0 for some CCW devices, but the relating code invirtio-ccw.cindicates that 0 could have also been in use for other machines types < 5.1, so further clean-up for code related to "max_revision" won't be done yet.
Please mention commit d55f518248f ("virtio: skip legacy support check on machine types less than 5.1")
Quoted 5 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 37 ------------------------------------- 1 file changed, 37 deletions(-)
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH 01/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Thomas Huth
They are older than 6 years, so according to our machine support policy, they can be removed now.
This removes the requirements for the storage keys "migration-enabled" property which will be removed in the next patch. It also removes the code that sets "
max_revision" to 0 for some CCW devices, but the relating code invirtio-ccw.cindicates that 0 could have also been in use for other machines types < 5.1, so further clean-up for code related to "max_revision" won't be done yet.
Quoted 2 lines
Please mention commit
d55f518248f("virtio: skip legacy support check on machine types less than 5.1")
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Huth <[email protected]>---
hw/s390x/s390-virtio-ccw.c| 37 -------------------------------------1 file changed, 37 deletions(-)
Re: [PATCH 01/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types
In reply to Thomas HuthQuoted 9 lines · Thomas Huth
They are older than 6 years, so according to our machine support policy, they can be removed now.
This removes the requirements for the storage keys "migration-enabled" property which will be removed in the next patch. It also removes the code that sets "
max_revision" to 0 for some CCW devices, but the relating code invirtio-ccw.cindicates that 0 could have also been in use for other machines types < 5.1, so further clean-up for code related to "max_revision" won't be done yet.
These are two different issues:
- QEMU 2.4 and earlier _defaulted_ to legacy virtio devices (enforced by setting max_revision to 0)
- QEMU 5.0 and earlier _allowed_ virtio device types to be configured as legacy devices that did not actually support legacy (e.g. virtio-gpu), there's a compat value to allow a max_revision of 0 for those old machine types
So that's not a problem -- but I wonder whether we had missed the boat elsewhere, when we introduced revisions > 1 (nothing much we can do now if that is the case, though.)
I also don't think we actually want to remove max_revision anyway, as it could also be used for non-compat related things (e.g. to accommodate a known buggy driver.)
Quoted 5 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 37 ------------------------------------- 1 file changed, 37 deletions(-)
The patch itself LGTM.
PATCH 2/10 hw/s390x/s390-skeys: Remove the "migration-enabled" property
In reply to Thomas HuthThis property was only set to "off" by the old s390-ccw-virtio-2.4 machine type which has now been removed. So we can now remove the property and the related code, too.
--- include/hw/s390x/storage-keys.h | 2 -- hw/s390x/s390-skeys.c | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-)
include/hw/s390x/storage-keys.h +0 -2
@@ -21,8 +21,6 @@ OBJECT_DECLARE_TYPE(S390SKeysState, S390SKeysClass, S390_SKEYS)struct S390SKeysState {DeviceState parent_obj; -bool migration_enabled; - };
hw/s390x/s390-skeys.c +1 -9
@@ -469,23 +469,15 @@ static void s390_skeys_realize(DeviceState *dev, Error **errp) {S390SKeysState *ss =S390_SKEYS (dev); -if (ss->migration_enabled) { -register_savevm_live (TYPE_S390_SKEYS ,0 ,1 , - &savevm_s390_storage_keys, ss); - } +register_savevm_live (TYPE_S390_SKEYS ,0 ,1 , &savevm_s390_storage_keys, ss); } -static const Property s390_skeys_props[] = { -DEFINE_PROP_BOOL ("migration-enabled" , S390SKeysState, migration_enabled, true), -}; -static void s390_skeys_class_init (ObjectClass *oc,void *data) {DeviceClass *dc =DEVICE_CLASS (oc); dc->hotpluggable = false; dc->realize = s390_skeys_realize; -device_class_set_props (dc, s390_skeys_props);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
Signature · 1 line
2.47.1
Re: [PATCH 02/10] hw/s390x/s390-skeys: Remove the "migration-enabled" property
Quoted 9 lines · Thomas Huth
This property was only set to "off" by the old s390-ccw-virtio-2.4 machine type which has now been removed. So we can now remove the property and the related code, too.
Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/storage-keys.h | 2 -- hw/s390x/s390-skeys.c | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-)
PATCH 3/10 hw/s390x/s390-virtio-ccw: Remove the deprecated 2.6 machine type
In reply to Thomas HuthThe s390-ccw-virtio-2.6 machine is older than 6 years, so according to our machine support policy, it can be removed now.
--- hw/s390x/s390-virtio-ccw.c | 20 -------------------- 1 file changed, 20 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -20
@@ -1305,26 +1305,6 @@ static void ccw_machine_2_7_class_options(MachineClass *mc) }DEFINE_CCW_MACHINE (2 ,7 ); -static void ccw_machine_2_6_instance_options (MachineState *machine) -{ -ccw_machine_2_7_instance_options (machine); -} - -static void ccw_machine_2_6_class_options (MachineClass *mc) -{ -S390CcwMachineClass *s390mc =S390_CCW_MACHINE_CLASS (mc); -static GlobalProperty compat[] = { - {TYPE_S390_IPL ,"iplbext_migration" ,"off" , }, - {TYPE_VIRTUAL_CSS_BRIDGE ,"css_dev_path" ,"off" , }, - }; - - s390mc->ri_allowed = false; -ccw_machine_2_7_class_options (mc); -compat_props_add (mc->compat_props, hw_compat_2_6, hw_compat_2_6_len); -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); -} -DEFINE_CCW_MACHINE (2 ,6 ); -#endif static void ccw_machine_register_types (void )
Signature · 1 line
2.47.1
Re: [PATCH 03/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.6 machine type
Quoted 7 lines · Thomas Huth
The s390-ccw-virtio-2.6 machine is older than 6 years, so according to our machine support policy, it can be removed now.
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 20 -------------------- 1 file changed, 20 deletions(-)
PATCH 4/10 hw/s390x: Remove the "ri_allowed" switch
In reply to Thomas HuthOnly s390-ccw-virtio-2.6 and older used to set this switch to "off", for newer machine types it is always enabled. Since we removed the old machine types now, we can also remove the switch in the code and assume that it is always enabled now.
--- include/hw/s390x/s390-virtio-ccw.h | 3 --- hw/s390x/s390-virtio-ccw.c | 14 ++++---------- target/s390x/kvm/kvm.c | 6 ++---- 3 files changed, 6 insertions(+), 17 deletions(-)
include/hw/s390x/s390-virtio-ccw.h +0 -3
@@ -53,14 +53,11 @@ struct S390CcwMachineClass {MachineClass parent_class;/*< public >*/ -bool ri_allowed;bool cpu_model_allowed;bool hpage_1m_allowed;int max_threads; }; -/* runtime-instrumentation allowed by the machine */ -bool ri_allowed (void );/* cpu model allowed by the machine */ bool cpu_model_allowed (void );/* 1M huge page mappings allowed by the machine */
hw/s390x/s390-virtio-ccw.c +4 -10
@@ -725,10 +725,10 @@ static S390CcwMachineClass *current_mc;* 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 (e.g. like -* the ri_allowed() wrapper) via this mechanism anymore. CPU features should -* be handled via the CPU models, i.e. checking with cpu_model_allowed() during -* CPU initialization and s390_has_feat() later should be sufficient. +* 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 cpu_model_allowed() during CPU initialization and +* s390_has_feat() later should be sufficient. */ static S390CcwMachineClass *get_machine_class (void ) {
@@ -744,11 +744,6 @@ static S390CcwMachineClass *get_machine_class(void)return current_mc; } -bool ri_allowed (void ) -{ -return get_machine_class ()->ri_allowed; -} -bool cpu_model_allowed (void ) {return get_machine_class ()->cpu_model_allowed;
@@ -791,7 +786,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->ri_allowed = true; s390mc->cpu_model_allowed = true; s390mc->hpage_1m_allowed = true; s390mc->max_threads =1 ;
target/s390x/kvm/kvm.c +2 -4
@@ -374,10 +374,8 @@ int kvm_arch_init(MachineState *ms, KVMState *s)kvm_vm_enable_cap (s,KVM_CAP_S390_VECTOR_REGISTERS ,0 );kvm_vm_enable_cap (s,KVM_CAP_S390_USER_STSI ,0 );kvm_vm_enable_cap (s,KVM_CAP_S390_CPU_TOPOLOGY ,0 ); -if (ri_allowed ()) { -if (kvm_vm_enable_cap (s,KVM_CAP_S390_RI ,0 ) ==0 ) { - cap_ri =1 ; - } +if (kvm_vm_enable_cap (s,KVM_CAP_S390_RI ,0 ) ==0 ) { + cap_ri =1 ; }if (cpu_model_allowed ()) {kvm_vm_enable_cap (s,KVM_CAP_S390_GS ,0 );
Signature · 1 line
2.47.1
Re: [PATCH 04/10] hw/s390x: Remove the "ri_allowed" switch
Quoted 11 lines · Thomas Huth
Only s390-ccw-virtio-2.6 and older used to set this switch to "off", for newer machine types it is always enabled. Since we removed the old machine types now, we can also remove the switch in the code and assume that it is always enabled now.
Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/s390-virtio-ccw.h | 3 --- hw/s390x/s390-virtio-ccw.c | 14 ++++---------- target/s390x/kvm/kvm.c | 6 ++---- 3 files changed, 6 insertions(+), 17 deletions(-)
PATCH 5/10 hw/s390x/ipl: Remove the "iplbext_migration" property
In reply to Thomas HuthNow that the old machine types that used this property have been removed, we can remove the property and the corresponding code.
--- hw/s390x/ipl.h | 1 - hw/s390x/ipl.c | 10 ---------- 2 files changed, 11 deletions(-)
hw/s390x/ipl.h +0 -1
@@ -80,7 +80,6 @@ struct S390IPLState {uint8_t cssid;uint8_t ssid;uint16_t devno; -bool iplbext_migration; };QEMU_BUILD_BUG_MSG (offsetof(S390IPLState , iplb) &3 ,"alignment of iplb wrong" );
hw/s390x/ipl.c +0 -10
@@ -49,13 +49,6 @@#define BIOS_MAX_SIZE 0x300000UL#define IPL_PSW_MASK (PSW_MASK_32 | PSW_MASK_64) -static bool iplb_extended_needed (void *opaque) -{ -S390IPLState *ipl =S390_IPL (object_resolve_path (TYPE_S390_IPL ,NULL )); - -return ipl->iplbext_migration; -} -/* Place the IPLB chain immediately before the BIOS in memory */ static uint64_t find_iplb_chain_addr (uint64_t bios_addr,uint16_t count) {
@@ -67,7 +60,6 @@ static const VMStateDescription vmstate_iplb_extended = { .name = "ipl/iplb_extended", .version_id = 0, .minimum_version_id = 0, - .needed = iplb_extended_needed, .fields = (const VMStateField []) {VMSTATE_UINT8_ARRAY (reserved_ext, IplParameterBlock,4096 -200 ),VMSTATE_END_OF_LIST ()
@@ -297,8 +289,6 @@ static const Property s390_ipl_properties[] = {DEFINE_PROP_STRING ("cmdline" , S390IPLState, cmdline),DEFINE_PROP_STRING ("firmware" , S390IPLState, firmware), DEFINE_PROP_BOOL("enforce_bios", S390IPLState, enforce_bios, false), -DEFINE_PROP_BOOL ("iplbext_migration" , S390IPLState, iplbext_migration, - true), };static void s390_ipl_set_boot_menu (S390IPLState *ipl)
Signature · 1 line
2.47.1
Re: [PATCH 05/10] hw/s390x/ipl: Remove the "iplbext_migration" property
Quoted 8 lines · Thomas Huth
Now that the old machine types that used this property have been removed, we can remove the property and the corresponding code.
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/ipl.h | 1 - hw/s390x/ipl.c | 10 ---------- 2 files changed, 11 deletions(-)
Re: [PATCH 05/10] hw/s390x/ipl: Remove the "iplbext_migration" property
In reply to Thomas HuthQuoted 8 lines · Thomas Huth
Now that the old machine types that used this property have been removed, we can remove the property and the corresponding code.
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/ipl.h | 1 - hw/s390x/ipl.c | 10 ---------- 2 files changed, 11 deletions(-)
PATCH 6/10 hw/s390x/css-bridge: Remove the "css_dev_path" property
In reply to Thomas HuthNow that the s390-ccw-virtio-2.6 and older machine types have been removed, the "css_dev_path" property of the css-bridge is also not used anymore and thus can be removed.
This way we finally get rid of the problem that has been described
in: https://gitlab.com/qemu-project/qemu/-/issues/2213
--- include/hw/s390x/css-bridge.h | 1 - hw/s390x/css-bridge.c | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-)
include/hw/s390x/css-bridge.h +0 -1
@@ -19,7 +19,6 @@/* virtual css bridge */ struct VirtualCssBridge {SysBusDevice sysbus_dev; -bool css_dev_path; };#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge"
hw/s390x/css-bridge.c +1 -15
@@ -66,16 +66,8 @@ static char *virtual_css_bus_get_dev_path(DeviceState *dev) {CcwDevice *ccw_dev =CCW_DEVICE (dev);SubchDev *sch = ccw_dev->sch; -VirtualCssBridge *bridge = -VIRTUAL_CSS_BRIDGE (qdev_get_parent_bus (dev)->parent); -/* -* We can't provide a dev path for backward compatibility on -* older machines, as it is visible in the migration stream. -*/ -return bridge->css_dev_path ? -g_strdup_printf ("/%02x.%1x.%04x" , sch->cssid, sch->ssid, sch->devno) : -NULL ; +return g_strdup_printf ("/%02x.%1x.%04x" , sch->cssid, sch->ssid, sch->devno); }static void virtual_css_bus_class_init (ObjectClass *klass,void *data)
@@ -120,11 +112,6 @@ VirtualCssBus *virtual_css_bus_init(void)/***************** Virtual-css Bus Bridge Device ********************/ -static const Property virtual_css_bridge_properties[] = { -DEFINE_PROP_BOOL ("css_dev_path" , VirtualCssBridge, css_dev_path, - true), -}; -static bool prop_get_true (Object *obj,Error **errp) {return true;
@@ -137,7 +124,6 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data) hc->unplug = ccw_device_unplug;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); -device_class_set_props (dc, virtual_css_bridge_properties);object_class_property_add_bool (klass,"cssid-unrestricted" , prop_get_true,NULL ); object_class_property_set_description(klass, "cssid-unrestricted",
Signature · 1 line
2.47.1
Re: [PATCH 06/10] hw/s390x/css-bridge: Remove the "css_dev_path" property
Quoted 4 lines · Thomas Huth
Now that the s390-ccw-virtio-2.6 and older machine types have been removed, the "
css_dev_path" property of the css-bridge is also not used anymore and thus can be removed.
Quoted 8 lines
This way we finally get rid of the problem that has been described
in: https://gitlab.com/qemu-project/qemu/-/issues/2213Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/css-bridge.h | 1 - hw/s390x/css-bridge.c | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-)
Re: [PATCH 06/10] hw/s390x/css-bridge: Remove the "css_dev_path" property
In reply to Thomas HuthQuoted 6 lines · Thomas Huth
Now that the s390-ccw-virtio-2.6 and older machine types have been removed, the "
css_dev_path" property of the css-bridge is also not used anymore and thus can be removed.This way we finally get rid of the problem that has been described
in: https://gitlab.com/qemu-project/qemu/-/issues/2213
\o/
Quoted 6 lines
Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/css-bridge.h | 1 - hw/s390x/css-bridge.c | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-)
PATCH 7/10 hw/s390x/s390-virtio-ccw: Remove the deprecated 2.7 machine type
In reply to Thomas HuthThe s390-ccw-virtio-2.7 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
@@ -1284,21 +1284,6 @@ static void ccw_machine_2_8_class_options(MachineClass *mc) }DEFINE_CCW_MACHINE (2 ,8 ); -static void ccw_machine_2_7_instance_options (MachineState *machine) -{ -ccw_machine_2_8_instance_options (machine); -} - -static void ccw_machine_2_7_class_options (MachineClass *mc) -{ -S390CcwMachineClass *s390mc =S390_CCW_MACHINE_CLASS (mc); - - s390mc->cpu_model_allowed = false; -ccw_machine_2_8_class_options (mc); -compat_props_add (mc->compat_props, hw_compat_2_7, hw_compat_2_7_len); -} -DEFINE_CCW_MACHINE (2 ,7 ); -#endif static void ccw_machine_register_types (void )
Signature · 1 line
2.47.1
Re: [PATCH 07/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.7 machine type
Quoted 7 lines · Thomas Huth
The s390-ccw-virtio-2.7 machine is older than 6 years, so according to our machine support policy, it can be removed now.
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 15 --------------- 1 file changed, 15 deletions(-)
PATCH 8/10 hw/s390x: Remove the cpu_model_allowed flag and related code
In reply to Thomas HuthNow that the last machine type that disabled cpu_model_allowed has been removed, we can also remove the cpu_model_allowed flag itself and all the related conditional code.
--- include/hw/s390x/s390-virtio-ccw.h | 3 --- hw/s390x/s390-virtio-ccw.c | 9 +-------- target/s390x/kvm/kvm.c | 10 ++-------- 3 files changed, 3 insertions(+), 19 deletions(-)
include/hw/s390x/s390-virtio-ccw.h +0 -3
@@ -53,13 +53,10 @@ struct S390CcwMachineClass {MachineClass parent_class;/*< public >*/ -bool cpu_model_allowed;bool hpage_1m_allowed;int max_threads; }; -/* cpu model allowed by the machine */ -bool cpu_model_allowed (void );/* 1M huge page mappings allowed by the machine */ bool hpage_1m_allowed (void );
hw/s390x/s390-virtio-ccw.c +1 -8
@@ -727,8 +727,7 @@ static S390CcwMachineClass *current_mc;* * 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 cpu_model_allowed() during CPU initialization and -* s390_has_feat() later should be sufficient. +* i.e. checking with s390_has_feat() should be sufficient. */ static S390CcwMachineClass *get_machine_class (void ) {
@@ -744,11 +743,6 @@ static S390CcwMachineClass *get_machine_class(void)return current_mc; } -bool cpu_model_allowed (void ) -{ -return get_machine_class ()->cpu_model_allowed; -} -bool hpage_1m_allowed (void ) {return get_machine_class ()->hpage_1m_allowed;
@@ -786,7 +780,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->cpu_model_allowed = true; s390mc->hpage_1m_allowed = true; s390mc->max_threads =1 ; mc->init = ccw_init;
target/s390x/kvm/kvm.c +2 -8
@@ -374,12 +374,10 @@ int kvm_arch_init(MachineState *ms, KVMState *s)kvm_vm_enable_cap (s,KVM_CAP_S390_VECTOR_REGISTERS ,0 );kvm_vm_enable_cap (s,KVM_CAP_S390_USER_STSI ,0 );kvm_vm_enable_cap (s,KVM_CAP_S390_CPU_TOPOLOGY ,0 ); +kvm_vm_enable_cap (s,KVM_CAP_S390_GS ,0 );if (kvm_vm_enable_cap (s,KVM_CAP_S390_RI ,0 ) ==0 ) { cap_ri =1 ; } -if (cpu_model_allowed ()) { -kvm_vm_enable_cap (s,KVM_CAP_S390_GS ,0 ); - }/* * The migration interface for ais was introduced with kernel 4.13
@@ -387,7 +385,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)* support is considered necessary, we only try to enable this for * newer machine types if KVM_CAP_S390_AIS_MIGRATION is available. */ -if (cpu_model_allowed () &&kvm_kernel_irqchip_allowed () && +if (kvm_kernel_irqchip_allowed () &&kvm_check_extension (s,KVM_CAP_S390_AIS_MIGRATION )) {kvm_vm_enable_cap (s,KVM_CAP_S390_AIS ,0 ); }
@@ -2352,10 +2350,6 @@ static int configure_cpu_feat(const S390FeatBitmap features)bool kvm_s390_cpu_models_supported (void ) { -if (!cpu_model_allowed ()) { -/* compatibility machines interfere with the cpu model */ -return false; - }return kvm_vm_check_attr (kvm_state,KVM_S390_VM_CPU_MODEL ,KVM_S390_VM_CPU_MACHINE ) && kvm_vm_check_attr(kvm_state, KVM_S390_VM_CPU_MODEL,
Signature · 1 line
2.47.1
Re: [PATCH 08/10] hw/s390x: Remove the cpu_model_allowed flag and related code
Quoted 10 lines · Thomas Huth
Now that the last machine type that disabled
cpu_model_allowedhas been removed, we can also remove thecpu_model_allowedflag itself and all the related conditional code.Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/s390-virtio-ccw.h | 3 --- hw/s390x/s390-virtio-ccw.c | 9 +-------- target/s390x/kvm/kvm.c | 10 ++-------- 3 files changed, 3 insertions(+), 19 deletions(-)
PATCH 9/10 hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type
In reply to Thomas HuthThe s390-ccw-virtio-2.8 machine is older than 6 years, so according to our machine support policy, it can be removed now.
--- hw/s390x/s390-virtio-ccw.c | 17 ----------------- 1 file changed, 17 deletions(-)
hw/s390x/s390-virtio-ccw.c +0 -17
@@ -1260,23 +1260,6 @@ static void ccw_machine_2_9_class_options(MachineClass *mc) }DEFINE_CCW_MACHINE (2 ,9 ); -static void ccw_machine_2_8_instance_options (MachineState *machine) -{ -ccw_machine_2_9_instance_options (machine); -} - -static void ccw_machine_2_8_class_options (MachineClass *mc) -{ -static GlobalProperty compat[] = { - {TYPE_S390_FLIC_COMMON ,"adapter_routes_max_batch" ,"64" , }, - }; - -ccw_machine_2_9_class_options (mc); -compat_props_add (mc->compat_props, hw_compat_2_8, hw_compat_2_8_len); -compat_props_add (mc->compat_props, compat,G_N_ELEMENTS (compat)); -} -DEFINE_CCW_MACHINE (2 ,8 ); -#endif static void ccw_machine_register_types (void )
Signature · 1 line
2.47.1
Re: [PATCH 09/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type
Quoted 7 lines · Thomas Huth
The s390-ccw-virtio-2.8 machine is older than 6 years, so according to our machine support policy, it can be removed now.
Signed-off-by Thomas Huth <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 17 ----------------- 1 file changed, 17 deletions(-)
PATCH 10/10 hw/s390x: Remove the "adapter_routes_max_batch" property from the flic
In reply to Thomas HuthNow that the s390-ccw-virtio-2.8 machine has been removed, we don't need the "adapter_routes_max_batch" property anymore and can remove it.
--- include/hw/s390x/s390_flic.h | 2 -- hw/intc/s390_flic.c | 9 --------- hw/s390x/virtio-ccw.c | 5 ++--- 3 files changed, 2 insertions(+), 14 deletions(-)
include/hw/s390x/s390_flic.h +0 -2
@@ -41,8 +41,6 @@ OBJECT_DECLARE_TYPE(S390FLICState, S390FLICStateClass,struct S390FLICState {SysBusDevice parent_obj; -/* to limit AdapterRoutes.num_routes for compat */ -uint32_t adapter_routes_max_batch;bool ais_supported;bool migration_enabled; };
hw/intc/s390_flic.c +0 -9
@@ -471,8 +471,6 @@ static void qemu_s390_flic_class_init(ObjectClass *oc, void *data) }static const Property s390_flic_common_properties[] = { -DEFINE_PROP_UINT32 ("adapter_routes_max_batch" , S390FLICState, - adapter_routes_max_batch,ADAPTER_ROUTES_MAX_GSI ),DEFINE_PROP_BOOL ("migration-enabled" , S390FLICState, migration_enabled, true), };
@@ -480,13 +478,6 @@ static const Property s390_flic_common_properties[] = {static void s390_flic_common_realize (DeviceState *dev,Error **errp) {S390FLICState *fs =S390_FLIC_COMMON (dev); -uint32_t max_batch = fs->adapter_routes_max_batch; - -if (max_batch >ADAPTER_ROUTES_MAX_GSI ) { -error_setg (errp,"flic property adapter_routes_max_batch too big" -" (%d > %d)" , max_batch,ADAPTER_ROUTES_MAX_GSI ); -return ; - } fs->ais_supported =s390_has_feat (S390_FEAT_ADAPTER_INT_SUPPRESSION ); }
hw/s390x/virtio-ccw.c +2 -3
@@ -1157,7 +1157,6 @@ static void virtio_ccw_device_plugged(DeviceState *d, Error **errp)CcwDevice *ccw_dev =CCW_DEVICE (d);SubchDev *sch = ccw_dev->sch;int n =virtio_get_num_queues (vdev); -S390FLICState *flic =s390_get_flic ();if (!virtio_has_feature (vdev->host_features,VIRTIO_F_VERSION_1 )) { dev->max_rev =0 ;
@@ -1184,10 +1183,10 @@ static void virtio_ccw_device_plugged(DeviceState *d, Error **errp) VIRTIO_QUEUE_MAX);return ; } -if (virtio_get_num_queues (vdev) > flic->adapter_routes_max_batch) { +if (virtio_get_num_queues (vdev) >ADAPTER_ROUTES_MAX_GSI ) {error_setg (errp,"The number of virtqueues %d " "exceeds flic adapter route limit %d" , n, - flic->adapter_routes_max_batch); +ADAPTER_ROUTES_MAX_GSI );return ; }
Signature · 1 line
2.47.1
Re: [PATCH 10/10] hw/s390x: Remove the "adapter_routes_max_batch" property from the flic
Quoted 9 lines · Thomas Huth
Now that the s390-ccw-virtio-2.8 machine has been removed, we don't need the "
adapter_routes_max_batch" property anymore and can remove it.Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/s390_flic.h | 2 -- hw/intc/s390_flic.c | 9 --------- hw/s390x/virtio-ccw.c | 5 ++--- 3 files changed, 2 insertions(+), 14 deletions(-)
Re: [PATCH 10/10] hw/s390x: Remove the "adapter_routes_max_batch" property from the flic
In reply to Thomas HuthQuoted 9 lines · Thomas Huth
Now that the s390-ccw-virtio-2.8 machine has been removed, we don't need the "
adapter_routes_max_batch" property anymore and can remove it.Signed-off-by Thomas Huth <[email protected]>--- include/hw/s390x/s390_flic.h | 2 -- hw/intc/s390_flic.c | 9 --------- hw/s390x/virtio-ccw.c | 5 ++--- 3 files changed, 2 insertions(+), 14 deletions(-)
Am 03.01.25 um 15:42 schrieb Thomas Huth:
Quoted 3 lines
According to our support policy, we don't support machine types anymore that are older than 6 years, so we can remove the very old 2.x machine types now. Let's start by removing all s390-virtio-ccw machines up to
not fully tested or reviewed, but
for the series.
Quoted 30 lines
version 2.8. (This also helps to get rid of the problem that has been described in: https://gitlab.com/qemu-project/qemu/-/issues/2213 )
Thomas Huth (10):
hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine
types
hw/s390x/s390-skeys: Remove the "migration-enabled" property hw/s390x/s390-virtio-ccw: Remove the deprecated 2.6 machine type hw/s390x: Remove the "ri_allowed" switch
hw/s390x/ipl: Remove the "iplbext_migration" property hw/s390x/css-bridge: Remove the "css_dev_path" property hw/s390x/s390-virtio-ccw: Remove the deprecated 2.7 machine type hw/s390x: Remove thecpu_model_allowedflag and related code hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type hw/s390x: Remove the "adapter_routes_max_batch" property from the flichw/s390x/ipl.h | 1 - include/hw/s390x/css-bridge.h | 1 - include/hw/s390x/s390-virtio-ccw.h | 6 -- include/hw/s390x/s390_flic.h | 2 - include/hw/s390x/storage-keys.h | 2 - hw/intc/s390_flic.c | 9 --- hw/s390x/css-bridge.c | 16 +---- hw/s390x/ipl.c | 10 --- hw/s390x/s390-skeys.c | 10 +-- hw/s390x/s390-virtio-ccw.c | 108 +---------------------------- hw/s390x/virtio-ccw.c | 5 +- target/s390x/kvm/kvm.c | 16 ++--- 12 files changed, 11 insertions(+), 175 deletions(-)