Received: from eggs.gnu.org ([2001:4830:134:3::10]:49799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boqs7-0001iQ-6V for qemu-devel@nongnu.org; Tue, 27 Sep 2016 07:48:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boqs1-0006Ny-90 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 07:48:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56643 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boqs1-0006Np-39 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 07:48:21 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8RBlpOM099986 for ; Tue, 27 Sep 2016 07:48:20 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 25qhfgjneh-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 27 Sep 2016 07:48:20 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Sep 2016 12:48:19 +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 782EC1B08074 for ; Tue, 27 Sep 2016 12:50:10 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8RBmGHI14156244 for ; Tue, 27 Sep 2016 11:48:16 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 u8RBmF6p018447 for ; Tue, 27 Sep 2016 05:48:16 -0600 From: Christian Borntraeger Date: Tue, 27 Sep 2016 13:48:34 +0200 In-Reply-To: <1474976917-102710-1-git-send-email-borntraeger@de.ibm.com> References: <1474976917-102710-1-git-send-email-borntraeger@de.ibm.com> Message-Id: <1474976917-102710-6-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 5/8] pc-bios/s390-ccw: enable subchannel for IPL I/O devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Cornelia Huck , Jens Freimann , Alexander Graf , Dong Jia Shi , Halil Pasic , Christian Borntraeger From: Dong Jia Shi IPL should cause the IPL I/O device to become enabled. So when handling the IPL program, we should set the E (Enable) bit. However, virtio-ccw does not know whether it's dealing with an IPL device or not. Since trying to perform I/O on a disabled device doesn't make any sense, let's just always enable it. At the same time we can remove the SCSW_FCTL_START_FUNC flag as it is ignored for msch anyway and did not enable the device as intended. Reported-by: Farhan Ali Signed-off-by: Dong Jia Shi Reviewed-by: Cornelia Huck Reviewed-by: Sascha Silbe Signed-off-by: Halil Pasic [remove superfluous flag] Signed-off-by: Christian Borntraeger --- pc-bios/s390-ccw/virtio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index 1d34e8c..b333734 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -97,7 +97,8 @@ static int run_ccw(VDev *vdev, int cmd, void *ptr, int len) /* start command processing */ stsch_err(vdev->schid, &schib); - schib.scsw.ctrl = SCSW_FCTL_START_FUNC; + /* enable the subchannel for IPL device */ + schib.pmcw.ena = 1; msch(vdev->schid, &schib); /* start subchannel command */ -- 2.5.5