From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxj2-000650-5W for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxj0-0002Bo-Rj for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:52 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:40911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxj0-0002BI-I7 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:50 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 Sep 2015 15:48:46 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 58C471B0806E for ; Mon, 7 Sep 2015 15:50:21 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t87Emh9a34472050 for ; Mon, 7 Sep 2015 14:48:44 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t87EmhZZ030341 for ; Mon, 7 Sep 2015 08:48:43 -0600 From: Cornelia Huck Date: Mon, 7 Sep 2015 16:48:19 +0200 Message-Id: <1441637317-14471-6-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1441637317-14471-1-git-send-email-cornelia.huck@de.ibm.com> References: <1441637317-14471-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL 05/23] s390x/event-facility: fix location of receive mask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, qemu-devel@nongnu.org, 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