From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw5PS-0004LE-KQ for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:17:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw5PP-0001bi-GG for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:17:02 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39085 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cw5PP-0001bN-9X for qemu-devel@nongnu.org; Thu, 06 Apr 2017 07:16:59 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v36BE6L0042495 for ; Thu, 6 Apr 2017 07:16:58 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 29n5h70kp7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 06 Apr 2017 07:16:58 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Apr 2017 12:16:55 +0100 From: Cornelia Huck Date: Thu, 6 Apr 2017 13:16:40 +0200 In-Reply-To: <20170406111646.12624-1-cornelia.huck@de.ibm.com> References: <20170406111646.12624-1-cornelia.huck@de.ibm.com> Message-Id: <20170406111646.12624-5-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH for-2.10 04/10] s390x/css: introduce read-only property type for device ids List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, agraf@suse.de, Dong Jia Shi , Cornelia Huck From: Dong Jia Shi Let's introduce a read-only property type that handles device ids of the CssDevId type used for channel devices for future use. e.g. exposing the busid of an I/O subchannel that is assigned to a ccw device. Signed-off-by: Dong Jia Shi Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 7 +++++++ include/hw/s390x/css.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 37caa98195..f966ce2d15 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -1894,6 +1894,13 @@ PropertyInfo css_devid_propinfo = { .set = set_css_devid, }; +PropertyInfo css_devid_ro_propinfo = { + .name = "str", + .description = "Read-only identifier of an I/O device in the channel " + "subsystem, example: fe.1.23ab", + .get = get_css_devid, +}; + SubchDev *css_create_virtual_sch(CssDevId bus_id, Error **errp) { uint16_t schid = 0; diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index c96c862057..e88f24b868 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -172,6 +172,11 @@ extern PropertyInfo css_devid_propinfo; #define DEFINE_PROP_CSS_DEV_ID(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, css_devid_propinfo, CssDevId) +extern PropertyInfo css_devid_ro_propinfo; + +#define DEFINE_PROP_CSS_DEV_ID_RO(_n, _s, _f) \ + DEFINE_PROP(_n, _s, _f, css_devid_ro_propinfo, CssDevId) + /** * Create a subchannel for the given bus id. * -- 2.11.0