From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeEy6-000693-Or for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeExx-0004qK-9V for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49346 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeExx-0004ps-2w for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:33 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 15 Oct 2014 05:09:03 +0200 Message-Id: <1413342561-4754-30-git-send-email-afaerber@suse.de> In-Reply-To: <1413342561-4754-1-git-send-email-afaerber@suse.de> References: <1413342561-4754-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 29/47] s390x: Convert s390-virtio to hotplug handler API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , Richard Henderson , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf From: Igor Mammedov Beside of conversion, patch drops present unplug handling, effectively disabling hot-unplug of s390-virtio devices. Signed-off-by: Igor Mammedov Reviewed-by: Cornelia Huck Signed-off-by: Andreas F=C3=A4rber --- hw/s390x/s390-virtio-bus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index f451ca1..5a9e52b 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -102,7 +102,7 @@ VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_s= ize) bus->next_ring =3D bus->dev_page + TARGET_PAGE_SIZE; =20 /* Enable hotplugging */ - _bus->allow_hotplug =3D 1; + qbus_set_hotplug_handler(_bus, dev, &error_abort); =20 /* Allocate RAM for VirtIO device pages (descriptors, queues, rings)= */ *ram_size +=3D S390_DEVICE_PAGES * TARGET_PAGE_SIZE; @@ -600,7 +600,6 @@ static void virtio_s390_device_class_init(ObjectClass= *klass, void *data) =20 dc->init =3D s390_virtio_busdev_init; dc->bus_type =3D TYPE_S390_VIRTIO_BUS; - dc->unplug =3D qdev_simple_unplug_cb; dc->reset =3D s390_virtio_busdev_reset; } =20 @@ -681,6 +680,10 @@ static const TypeInfo s390_virtio_bridge_info =3D { .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(SysBusDevice), .class_init =3D s390_virtio_bridge_class_init, + .interfaces =3D (InterfaceInfo[]) { + { TYPE_HOTPLUG_HANDLER }, + { } + } }; =20 /* virtio-s390-bus */ @@ -689,13 +692,10 @@ static void virtio_s390_bus_new(VirtioBusState *bus= , size_t bus_size, VirtIOS390Device *dev) { DeviceState *qdev =3D DEVICE(dev); - BusState *qbus; char virtio_bus_name[] =3D "virtio-bus"; =20 qbus_create_inplace(bus, bus_size, TYPE_VIRTIO_S390_BUS, qdev, virtio_bus_name); - qbus =3D BUS(bus); - qbus->allow_hotplug =3D 1; } =20 static void virtio_s390_bus_class_init(ObjectClass *klass, void *data) --=20 1.8.4.5