[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/15] virtio-s390: add a reset function to virtio-s
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 12/15] virtio-s390: add a reset function to virtio-s390 devices |
Date: |
Fri, 25 Jan 2013 13:48:55 +0100 |
From: Paolo Bonzini <address@hidden>
virtio-s390 devices are not being reset when their bus is. To fix
this, add a reset method that forwards to virtio_reset. This is
only needed because of the "strange" modeling of virtio devices;
the ->vdev link is being handled manually rather than through qdev.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/s390-virtio-bus.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index b5d1f2b..6858db0 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -508,6 +508,13 @@ static int s390_virtio_busdev_init(DeviceState *dev)
return _info->init(_dev);
}
+static void s390_virtio_busdev_reset(DeviceState *dev)
+{
+ VirtIOS390Device *_dev = (VirtIOS390Device *)dev;
+
+ virtio_reset(_dev->vdev);
+}
+
static void virtio_s390_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -515,6 +522,7 @@ static void virtio_s390_device_class_init(ObjectClass
*klass, void *data)
dc->init = s390_virtio_busdev_init;
dc->bus_type = TYPE_S390_VIRTIO_BUS;
dc->unplug = qdev_simple_unplug_cb;
+ dc->reset = s390_virtio_busdev_reset;
}
static const TypeInfo virtio_s390_device_info = {
--
1.6.0.2
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., (continued)
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Alexander Graf, 2013/01/25
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Blue Swirl, 2013/01/26
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Andreas Färber, 2013/01/26
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Blue Swirl, 2013/01/26
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Cornelia Huck, 2013/01/28
- Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions., Alexander Graf, 2013/01/28
- [Qemu-devel] [PATCH 10/15] s390: Add new channel I/O based virtio transport., Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 14/15] s390-virtio: Check for NULL device in reset hypercall, Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 11/15] s390: Make typeinfo const, Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 08/15] s390: Wire up channel I/O in kvm., Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 12/15] virtio-s390: add a reset function to virtio-s390 devices,
Alexander Graf <=
- [Qemu-devel] [PATCH 07/15] s390: Virtual channel subsystem support., Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 09/15] s390-virtio: Factor out some initialization code., Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 13/15] s390: Move hw files to hw/s390x, Alexander Graf, 2013/01/25
- [Qemu-devel] [PATCH 15/15] s390: Add s390-ccw-virtio machine., Alexander Graf, 2013/01/25
- Re: [Qemu-devel] [PULL 00/15] s390 patch queue 2013-01-25, Blue Swirl, 2013/01/26