[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] hw/s390x/event-facility: Remove the obsolete "allow_all_mask
From: |
Thomas Huth |
Subject: |
[PATCH 6/8] hw/s390x/event-facility: Remove the obsolete "allow_all_mask_sizes" code |
Date: |
Wed, 15 Jan 2025 08:38:17 +0100 |
Now that the machine types 2.11 and older have been removed, we
don't need the "allow_all_mask_sizes" compatibility handling code
anymore and can remove it now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/event-facility.c | 37 +------------------------------------
1 file changed, 1 insertion(+), 36 deletions(-)
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 2b0332c20e..76ba688370 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -45,13 +45,6 @@ struct SCLPEventFacility {
uint32_t receive_mask_pieces[2];
sccb_mask_t receive_mask;
};
- /*
- * when false, we keep the same broken, backwards compatible behaviour as
- * before, allowing only masks of size exactly 4; when true, we implement
- * the architecture correctly, allowing all valid mask sizes. Needed for
- * migration toward older versions.
- */
- bool allow_all_mask_sizes;
/* length of the receive mask */
uint16_t mask_length;
};
@@ -294,8 +287,7 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB
*sccb)
uint16_t mask_length = be16_to_cpu(we_mask->mask_length);
sccb_mask_t tmp_mask;
- if (!mask_length || (mask_length > SCLP_EVENT_MASK_LEN_MAX) ||
- ((mask_length != 4) && !ef->allow_all_mask_sizes)) {
+ if (!mask_length || mask_length > SCLP_EVENT_MASK_LEN_MAX) {
sccb->h.response_code = cpu_to_be16(SCLP_RC_INVALID_MASK_LENGTH);
return;
}
@@ -355,13 +347,6 @@ static bool vmstate_event_facility_mask64_needed(void
*opaque)
return (ef->receive_mask & 0xFFFFFFFF) != 0;
}
-static bool vmstate_event_facility_mask_length_needed(void *opaque)
-{
- SCLPEventFacility *ef = opaque;
-
- return ef->allow_all_mask_sizes;
-}
-
static const VMStateDescription vmstate_event_facility_mask64 = {
.name = "vmstate-event-facility/mask64",
.version_id = 0,
@@ -377,7 +362,6 @@ static const VMStateDescription
vmstate_event_facility_mask_length = {
.name = "vmstate-event-facility/mask_length",
.version_id = 0,
.minimum_version_id = 0,
- .needed = vmstate_event_facility_mask_length_needed,
.fields = (const VMStateField[]) {
VMSTATE_UINT16(mask_length, SCLPEventFacility),
VMSTATE_END_OF_LIST()
@@ -399,31 +383,12 @@ static const VMStateDescription vmstate_event_facility = {
}
};
-static void sclp_event_set_allow_all_mask_sizes(Object *obj, bool value,
- Error **errp)
-{
- SCLPEventFacility *ef = (SCLPEventFacility *)obj;
-
- ef->allow_all_mask_sizes = value;
-}
-
-static bool sclp_event_get_allow_all_mask_sizes(Object *obj, Error **errp)
-{
- SCLPEventFacility *ef = (SCLPEventFacility *)obj;
-
- return ef->allow_all_mask_sizes;
-}
-
static void init_event_facility(Object *obj)
{
SCLPEventFacility *event_facility = EVENT_FACILITY(obj);
DeviceState *sdev = DEVICE(obj);
event_facility->mask_length = 4;
- event_facility->allow_all_mask_sizes = true;
- object_property_add_bool(obj, "allow_all_mask_sizes",
- sclp_event_get_allow_all_mask_sizes,
- sclp_event_set_allow_all_mask_sizes);
/* Spawn a new bus for SCLP events */
qbus_init(&event_facility->sbus, sizeof(event_facility->sbus),
--
2.47.1
- [PATCH 0/8] s390x: Remove deprecated machine types v2.9 up to v2.12, Thomas Huth, 2025/01/15
- [PATCH 1/8] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.9 machine type, Thomas Huth, 2025/01/15
- [PATCH 2/8] hw/s390x/css: Remove the obsolete "css_migration_enabled" variable, Thomas Huth, 2025/01/15
- [PATCH 3/8] hw/s390x/s390-stattrib: Remove the old migration_enabled flag, Thomas Huth, 2025/01/15
- [PATCH 4/8] hw/intc/s390_flic: Remove the obsolete migration_enabled flag, Thomas Huth, 2025/01/15
- [PATCH 5/8] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.10 and 2.11 machine types, Thomas Huth, 2025/01/15
- [PATCH 6/8] hw/s390x/event-facility: Remove the obsolete "allow_all_mask_sizes" code,
Thomas Huth <=
- [PATCH 7/8] target/s390x/gen-features: Remove the v2.11 qemu CPU model, Thomas Huth, 2025/01/15
- [PATCH 8/8] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.12 machine type, Thomas Huth, 2025/01/15
- Re: [PATCH 0/8] s390x: Remove deprecated machine types v2.9 up to v2.12, Philippe Mathieu-Daudé, 2025/01/15