qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 14/15] virtio-s390: reset all qbuses too when wr


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 14/15] virtio-s390: reset all qbuses too when writing to the status field
Date: Mon, 17 Dec 2012 17:29:28 +0100

On 17.12.2012, at 17:24, Paolo Bonzini wrote:

> virtio-s390 devices do not perform a reset when zero is written to the
> status byte.  Because of this, a virtio reset does not cancel in-flight
> I/O for virtio-scsi.
> 
> Use qdev_reset_all so that the reset correctly propagates down the qdev
> bus hierarchy.

Works for me.

Alex

> 
> 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 34173a7..b8465d1 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.2
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]