diff options
| author | Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> | 2017-05-17 02:48:05 +0200 |
|---|---|---|
| committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2017-05-19 12:29:01 +0200 |
| commit | 817d4a6bc8bc6c2ad57ffdbab1a33c9b930ddde4 (patch) | |
| tree | 40fef78b854e5ec1f3d4c29b04636afa3cf9152d /hw/s390x/virtio-ccw.c | |
| parent | 8f3cf0128cbac1ac19be8515dc184edb88dd5fb1 (diff) | |
| download | focaccia-qemu-817d4a6bc8bc6c2ad57ffdbab1a33c9b930ddde4.tar.gz focaccia-qemu-817d4a6bc8bc6c2ad57ffdbab1a33c9b930ddde4.zip | |
s390x/css: realize css_create_sch
The S390 virtual css support already has a mechanism to create a virtual subchannel and provide it to the guest. However, to pass-through subchannels to a guest, we need to introduce a new mechanism to create the subchannel according to the real device information. Thus we reconstruct css_create_virtual_sch to a new css_create_sch function to handle all these cases and do allocation and initialization of the subchannel according to the device type and machine configuration. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170517004813.58227-6-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.c')
| -rw-r--r-- | hw/s390x/virtio-ccw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index e7167e3d05..4e386e9781 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -680,9 +680,13 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *dev, Error **errp) VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_GET_CLASS(dev); CcwDevice *ccw_dev = CCW_DEVICE(dev); CCWDeviceClass *ck = CCW_DEVICE_GET_CLASS(ccw_dev); - SubchDev *sch = css_create_virtual_sch(ccw_dev->devno, errp); + DeviceState *parent = DEVICE(ccw_dev); + BusState *qbus = qdev_get_parent_bus(parent); + VirtualCssBus *cbus = VIRTUAL_CSS_BUS(qbus); + SubchDev *sch; Error *err = NULL; + sch = css_create_sch(ccw_dev->devno, true, cbus->squash_mcss, errp); if (!sch) { return; } |