From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWN2p-0006f4-Bq for qemu-devel@nongnu.org; Mon, 31 Aug 2015 07:14:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWN2l-0006JW-42 for qemu-devel@nongnu.org; Mon, 31 Aug 2015 07:14:35 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:56009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWN2k-0006J2-Qq for qemu-devel@nongnu.org; Mon, 31 Aug 2015 07:14:31 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 31 Aug 2015 12:14:29 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id A48E41B08069 for ; Mon, 31 Aug 2015 12:16:02 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7VBEPHO22020166 for ; Mon, 31 Aug 2015 11:14:28 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7VBEFYF022169 for ; Mon, 31 Aug 2015 05:14:16 -0600 From: Cornelia Huck Date: Mon, 31 Aug 2015 13:13:45 +0200 Message-Id: <1441019643-10677-6-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1441019643-10677-1-git-send-email-cornelia.huck@de.ibm.com> References: <1441019643-10677-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH 05/23] s390x/event-facility: fix location of receive mask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de 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 6a062b6..871f3e7 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 { -- 2.5.1