From: Thomas Huth <thuth@redhat.com>
To: qemu-s390x@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>
Cc: qemu-devel@nongnu.org, David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH v2 3/9] hw/s390x/event-facility: Remove the obsolete "allow_all_mask_sizes" code
Date: Tue, 6 May 2025 08:21:42 +0200 [thread overview]
Message-ID: <20250506062148.306084-4-thuth@redhat.com> (raw)
In-Reply-To: <20250506062148.306084-1-thuth@redhat.com>
From: Thomas Huth <thuth@redhat.com>
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.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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 1afe3645730..7b7bf237fed 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.49.0
next prev parent reply other threads:[~2025-05-06 6:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 6:21 [PATCH v2 0/9] s390x: Remove deprecated machine types up to v4.0 Thomas Huth
2025-05-06 6:21 ` [PATCH v2 1/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.10 machine type Thomas Huth
2025-05-06 8:11 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 2/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.11 " Thomas Huth
2025-05-06 8:11 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` Thomas Huth [this message]
2025-05-06 8:15 ` [PATCH v2 3/9] hw/s390x/event-facility: Remove the obsolete "allow_all_mask_sizes" code Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 4/9] target/s390x: Rename the qemu_V2_11 feature set to qemu_MIN Thomas Huth
2025-05-06 8:12 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 5/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.12 machine type Thomas Huth
2025-05-06 8:13 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 6/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.0 " Thomas Huth
2025-05-06 8:13 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 7/9] hw/s390x: Remove the obsolete hpage_1m_allowed switch Thomas Huth
2025-05-06 6:21 ` [PATCH v2 8/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 3.1 machine type Thomas Huth
2025-05-06 8:14 ` Philippe Mathieu-Daudé
2025-05-06 6:21 ` [PATCH v2 9/9] hw/s390x/s390-virtio-ccw: Remove the deprecated 4.0 " Thomas Huth
2025-05-06 8:14 ` Philippe Mathieu-Daudé
2025-05-14 1:50 ` [PATCH v2 0/9] s390x: Remove deprecated machine types up to v4.0 Eric Farman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250506062148.306084-4-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).