[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 3/9] virtio: stop virtqueue processing if devic
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC v2 3/9] virtio: stop virtqueue processing if device is broken |
Date: |
Wed, 30 Mar 2016 13:19:06 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Mar 29, 2016 at 06:58:03PM +0200, Cornelia Huck wrote:
> On Tue, 29 Mar 2016 17:12:55 +0100
> Stefan Hajnoczi <address@hidden> wrote:
> > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> > index 2b5b248..1565e53 100644
> > --- a/include/hw/virtio/virtio.h
> > +++ b/include/hw/virtio/virtio.h
> > @@ -87,6 +87,7 @@ struct VirtIODevice
> > VirtQueue *vq;
> > uint16_t device_id;
> > bool vm_running;
> > + bool broken; /* device in invalid state, needs reset */
>
> I'm wondering whether there's a sane way to track the broken state via
> the NEEDS_RESET status bit instead. We'd probably want to filter out
> this bit and not expose it to legacy drivers; but as the status field
> is migrated anyway, we might be able to avoid a subsection for
> migration.
If we set the non-VIRTIO 1.0 bit and migrate to an old QEMU that doesn't
filter the bit then the guest will see it.
Therefore I'm in favor of keeping vdev->broken separate from the status
bit. The subsection only needs to be sent when the bit is set. Only
migration of a broken device to an old QEMU will fail. All other cases
continue to work so the subsection doesn't impose much incompatibility.
Stefan
signature.asc
Description: PGP signature
- [Qemu-devel] [RFC v2 0/9] virtio: avoid exit() when device enters invalid states, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 1/9] virtio: fix stray tab character, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 2/9] include: update virtio_config.h Linux header, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 3/9] virtio: stop virtqueue processing if device is broken, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 6/9] virtio: use unsigned int for virtqueue_get_avail_bytes() index, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 4/9] virtio: handle virtqueue_map_desc() errors, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 5/9] virtio: handle virtqueue_get_avail_bytes() errors, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 9/9] virtio: handle virtqueue_get_head() errors, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 7/9] virtio: handle virtqueue_read_next_desc() errors, Stefan Hajnoczi, 2016/03/29
- [Qemu-devel] [RFC v2 8/9] virtio: handle virtqueue_num_heads() errors, Stefan Hajnoczi, 2016/03/29