[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] virtio-s390: reset all qbuses too when writing
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 2/2] virtio-s390: reset all qbuses too when writing to the status field |
Date: |
Wed, 12 Dec 2012 15:26:36 +0100 |
virtio-s390 devices do not perform a full reset when zero is written
to the status field. The reset does not propagate down the qdev bus
hierarchy. Because of this, a virtio reset does not cancel in-flight
I/O for virtio-scsi.
Reported-by: Bryan Venteicher <address@hidden>
Cc: Alexander Graf <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/s390-virtio-bus.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index e0ac2d1..91d5a3a 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -309,8 +309,14 @@ void s390_virtio_device_update_status(VirtIOS390Device
*dev)
{
VirtIODevice *vdev = dev->vdev;
uint32_t features;
+ unsigned char status;
- virtio_set_status(vdev, ldub_phys(dev->dev_offs + VIRTIO_DEV_OFFS_STATUS));
+ status = ldub_phys(dev->dev_offs + VIRTIO_DEV_OFFS_STATUS);
+ if (status == 0) {
+ qdev_reset_all((DeviceState *)dev);
+ }
+
+ virtio_set_status(vdev, status);
/* Update guest supported feature bitmap */
--
1.8.0.1
- [Qemu-devel] [PATCH 0/2] virtio: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 2/2] virtio-s390: reset all qbuses too when writing to the status field,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [PATCH 1/2] virtio-pci: reset all qbuses too when writing to the status field, Paolo Bonzini, 2012/12/13
Re: [Qemu-devel] [PATCH 0/2] virtio: reset all qbuses too when writing to the status field, Michael S. Tsirkin, 2012/12/12