[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/11] s390x/css: introduce read-only property type f
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 04/11] s390x/css: introduce read-only property type for device ids |
Date: |
Fri, 21 Apr 2017 09:40:31 +0200 |
From: Dong Jia Shi <address@hidden>
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 <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
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
- [Qemu-devel] [PULL 00/11] s390x patches for 2.10, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 01/11] s390x: introduce 2.10 compat machine, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 02/11] s390x/kvm: make printf always compile in debug output, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 03/11] s390x/pci: make printf always compile in debug output, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 07/11] s390x: use enum for adapter type and standardize its naming, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 04/11] s390x/css: introduce read-only property type for device ids,
Cornelia Huck <=
- [Qemu-devel] [PULL 06/11] s390x/css: consolidate the devno property for ccw devices, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 10/11] s390x: register I/O adapters per ISC during init, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 05/11] s390x/css: provide introspection for virtual subchannel and device busid, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 08/11] s390x: initialize flic before I/O subsystems, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 09/11] s390x/flic: cache flic in s390_get_flic, Cornelia Huck, 2017/04/21
- [Qemu-devel] [PULL 11/11] s390x: Drop useless casts, Cornelia Huck, 2017/04/21
- Re: [Qemu-devel] [PULL 00/11] s390x patches for 2.10, Peter Maydell, 2017/04/21