From f7822aa8b610a4fec57a09066974e5c088592c08 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 27 Jul 2015 16:55:23 +0200 Subject: [PATCH] s390x/event-facility: fix location of receive mask For read event mask, we assumed that the layout of the sccb was |sccb header|event buffer header|receive mask|...| The correct layout, however, is |sccb header|receive mask|...| as in-buffer and |sccb header|event buffer header|...| as out-buffer. Fix this: This makes selective read work. Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- include/hw/s390x/event-facility.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index 6a062b668af5..871f3e7f1116 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -146,8 +146,10 @@ typedef struct WriteEventData { typedef struct ReadEventData { SCCBHeader h; - EventBufferHeader ebh; - uint32_t mask; + union { + uint32_t mask; + EventBufferHeader ebh; + }; } QEMU_PACKED ReadEventData; typedef struct SCLPEvent {