From nobody Mon Feb 9 10:48:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1491477897484964.3595412376648; Thu, 6 Apr 2017 04:24:57 -0700 (PDT) Received: from localhost ([::1]:44951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw5X5-0001x1-Rh for importer@patchew.org; Thu, 06 Apr 2017 07:24:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw5PW-0004Ta-Q1 for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:17:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw5PS-0001d0-Di for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:17:06 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cw5PS-0001ca-3v for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:17:02 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v36BDvlw038947 for ; Thu, 6 Apr 2017 07:17:01 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 29nm639vd2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 06 Apr 2017 07:17:00 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Apr 2017 12:16:58 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 6 Apr 2017 12:16:56 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v36BGtcS36896888; Thu, 6 Apr 2017 11:16:55 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22B425203F; Thu, 6 Apr 2017 11:14:58 +0100 (BST) Received: from gondolin.boeblingen.de.ibm.com (unknown [9.152.224.55]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id E7B9E5206D; Thu, 6 Apr 2017 11:14:57 +0100 (BST) From: Cornelia Huck To: qemu-devel@nongnu.org Date: Thu, 6 Apr 2017 13:16:42 +0200 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170406111646.12624-1-cornelia.huck@de.ibm.com> References: <20170406111646.12624-1-cornelia.huck@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17040611-0040-0000-0000-000003609E85 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040611-0041-0000-0000-000024D83884 Message-Id: <20170406111646.12624-7-cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-06_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704060093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH for-2.10 06/10] s390x/css: consolidate the devno property for ccw devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , borntraeger@de.ibm.com, Dong Jia Shi , agraf@suse.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Dong Jia Shi 'devno' should rather be a property of the ccw device, instead of a property of a specific virtio-ccw device. Let's consolidate it. While we are at here, also rename CcwDevice.bus_id to CcwDevice.devno to make things clearer. Signed-off-by: Dong Jia Shi Signed-off-by: Cornelia Huck --- hw/s390x/ccw-device.c | 1 + hw/s390x/ccw-device.h | 2 +- hw/s390x/virtio-ccw.c | 14 ++------------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index 8fe3cf49ef..fb8d640a7e 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -34,6 +34,7 @@ static void ccw_device_realize(CcwDevice *dev, Error **er= rp) } =20 static Property ccw_device_properties[] =3D { + DEFINE_PROP_CSS_DEV_ID("devno", CcwDevice, devno), DEFINE_PROP_CSS_DEV_ID_RO("dev_id", CcwDevice, dev_id), DEFINE_PROP_CSS_DEV_ID_RO("subch_id", CcwDevice, subch_id), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h index 48700fe23a..89c8e5dff7 100644 --- a/hw/s390x/ccw-device.h +++ b/hw/s390x/ccw-device.h @@ -20,7 +20,7 @@ typedef struct CcwDevice { SubchDev *sch; /* .. */ /* The user-set busid of the virtual ccw device. */ - CssDevId bus_id; + CssDevId devno; /* The actual busid of the virtual ccw device. */ CssDevId dev_id; /* The actual busid of the virtual subchannel. */ diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 4e59e34d74..a81e27f7fd 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -681,7 +681,7 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *= dev, Error **errp) VirtIOCCWDeviceClass *k =3D VIRTIO_CCW_DEVICE_GET_CLASS(dev); CcwDevice *ccw_dev =3D CCW_DEVICE(dev); CCWDeviceClass *ck =3D CCW_DEVICE_GET_CLASS(ccw_dev); - SubchDev *sch =3D css_create_virtual_sch(ccw_dev->bus_id, errp); + SubchDev *sch =3D css_create_virtual_sch(ccw_dev->devno, errp); Error *err =3D NULL; =20 if (!sch) { @@ -705,7 +705,7 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *= dev, Error **errp) =20 trace_virtio_ccw_new_device( sch->cssid, sch->ssid, sch->schid, sch->devno, - ccw_dev->bus_id.valid ? "user-configured" : "auto-configured"); + ccw_dev->devno.valid ? "user-configured" : "auto-configured"); =20 if (!kvm_eventfds_enabled()) { dev->flags &=3D ~VIRTIO_CCW_FLAG_USE_IOEVENTFD; @@ -1370,7 +1370,6 @@ static void virtio_ccw_device_unplugged(DeviceState *= d) /**************** Virtio-ccw Bus Device Descriptions *******************/ =20 static Property virtio_ccw_net_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1399,7 +1398,6 @@ static const TypeInfo virtio_ccw_net =3D { }; =20 static Property virtio_ccw_blk_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1428,7 +1426,6 @@ static const TypeInfo virtio_ccw_blk =3D { }; =20 static Property virtio_ccw_serial_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1457,7 +1454,6 @@ static const TypeInfo virtio_ccw_serial =3D { }; =20 static Property virtio_ccw_balloon_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1486,7 +1482,6 @@ static const TypeInfo virtio_ccw_balloon =3D { }; =20 static Property virtio_ccw_scsi_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1516,7 +1511,6 @@ static const TypeInfo virtio_ccw_scsi =3D { =20 #ifdef CONFIG_VHOST_SCSI static Property vhost_ccw_scsi_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), DEFINE_PROP_END_OF_LIST(), @@ -1554,7 +1548,6 @@ static void virtio_ccw_rng_instance_init(Object *obj) } =20 static Property virtio_ccw_rng_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1583,7 +1576,6 @@ static const TypeInfo virtio_ccw_rng =3D { }; =20 static Property virtio_ccw_crypto_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1710,7 +1702,6 @@ static const TypeInfo virtio_ccw_bus_info =3D { =20 #ifdef CONFIG_VIRTFS static Property virtio_ccw_9p_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags, VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, @@ -1759,7 +1750,6 @@ static const TypeInfo virtio_ccw_9p_info =3D { #ifdef CONFIG_VHOST_VSOCK =20 static Property vhost_vsock_ccw_properties[] =3D { - DEFINE_PROP_CSS_DEV_ID("devno", VirtioCcwDevice, parent_obj.bus_id), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), DEFINE_PROP_END_OF_LIST(), --=20 2.11.0