Received: from eggs.gnu.org ([2001:4830:134:3::10]:51907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxj1-00064m-CR for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxix-0002A4-Ad for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:51 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:40888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxix-00029d-12 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:48:47 -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:45 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id EC3EB17D8070 for ; Mon, 7 Sep 2015 15:50:26 +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 t87EmgQR27852842 for ; Mon, 7 Sep 2015 14:48:42 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 t87EmfYt030256 for ; Mon, 7 Sep 2015 08:48:42 -0600 From: Cornelia Huck Date: Mon, 7 Sep 2015 16:48:15 +0200 Message-Id: <1441637317-14471-2-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 01/23] s390x/css: handle ccw-0 TIC correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Pierre Morel , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Cornelia Huck From: Pierre Morel In CCW-0 format TIC command 4 highest bits are ignored in the subchannel. In CCW-1 format the TIC command 4 highest bits must be 0. To convert TIC from CCW-0 to CCW-1 we clear the 4 highest bits to guarantee compatibility. Signed-off-by: Pierre Morel Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 5df450e..2c0782c 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -261,6 +261,9 @@ static CCW1 copy_ccw_from_guest(hwaddr addr, bool fmt1) ret.flags = tmp0.flags; ret.count = be16_to_cpu(tmp0.count); ret.cda = be16_to_cpu(tmp0.cda1) | (tmp0.cda0 << 16); + if ((ret.cmd_code & 0x0f) == CCW_CMD_TIC) { + ret.cmd_code &= 0x0f; + } } return ret; } -- 2.5.1