From patchwork Wed Dec 19 09:53:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC, V8, 07/15] virtio-s390-device : create a virtio-s390-bus during init. Date: Tue, 18 Dec 2012 23:53:33 -0000 From: fred.konrad@greensocs.com X-Patchwork-Id: 207320 Message-Id: <1355910821-21302-8-git-send-email-fred.konrad@greensocs.com> To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, e.voevodin@samsung.com, mark.burton@greensocs.com, agraf@suse.de, stefanha@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de, fred.konrad@greensocs.com From: KONRAD Frederic Create a virtio-s390-bus during init, so the refactored virtio device can be connected. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 2 ++ hw/s390-virtio-bus.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index 720dbb9..849adab 100644 --- a/hw/s390-virtio-bus.c +++ b/hw/s390-virtio-bus.c @@ -490,6 +490,8 @@ static int s390_virtio_busdev_init(DeviceState *dev) VirtIOS390Device *_dev = (VirtIOS390Device *)dev; VirtIOS390DeviceClass *_info = VIRTIO_S390_DEVICE_GET_CLASS(dev); + _dev->bus = virtio_s390_bus_new(_dev); + return _info->init(_dev); } diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index 7c5a945..08e68c2 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -90,6 +90,7 @@ struct VirtIOS390Device { virtio_net_conf net; VirtIOSCSIConf scsi; VirtIORNGConf rng; + VirtioBusState *bus; }; typedef struct VirtIOS390Bus {