From patchwork Mon Aug 31 11:13:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 512440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A788D1401DA for ; Mon, 31 Aug 2015 21:15:24 +1000 (AEST) Received: from localhost ([::1]:35999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWN3Y-0007sJ-W0 for incoming@patchwork.ozlabs.org; Mon, 31 Aug 2015 07:15:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWN2p-0006f2-3B for qemu-devel@nongnu.org; Mon, 31 Aug 2015 07:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWN2l-0006JQ-2M for qemu-devel@nongnu.org; Mon, 31 Aug 2015 07:14:35 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:56005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWN2k-0006Ij-Or 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 d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 31 Aug 2015 12:14:27 +0100 X-Helo: d06dlp02.portsmouth.uk.ibm.com X-MailFrom: cornelia.huck@de.ibm.com X-RcptTo: qemu-devel@nongnu.org Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 395802190056 for ; Mon, 31 Aug 2015 12:14:00 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7VBEOt511862266 for ; Mon, 31 Aug 2015 11:14:27 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 t7VBEFtT022093 for ; Mon, 31 Aug 2015 05:14:15 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-121.boeblingen.de.ibm.com [9.152.224.121]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t7VBEEwU021764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 31 Aug 2015 05:14:14 -0600 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Mon, 31 Aug 2015 13:13:41 +0200 Message-Id: <1441019643-10677-2-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.5.1 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> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15083111-0041-0000-0000-0000057197B8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.106 Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Pierre Morel , agraf@suse.de Subject: [Qemu-devel] [PATCH 01/23] s390x/css: handle ccw-0 TIC correctly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }