[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-r
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call |
Date: |
Thu, 4 Dec 2014 17:43:52 +0100 |
On Thu, 4 Dec 2014 18:20:05 +0200
"Michael S. Tsirkin" <address@hidden> wrote:
> On Tue, Dec 02, 2014 at 02:00:18PM +0100, Cornelia Huck wrote:
> > From: Thomas Huth <address@hidden>
> >
> > Handle the virtio-ccw revision according to what the guest sets.
> > When revision 1 is selected, we have a virtio-1 standard device
> > with byteswapping for the virtio rings.
> >
> > When a channel gets disabled, we have to revert to the legacy behavior
> > in case the next user of the device does not negotiate the revision 1
> > anymore (e.g. the boot firmware uses revision 1, but the operating
> > system only uses the legacy mode).
> >
> > Note that revisions > 0 are still disabled.
> >
> > Signed-off-by: Thomas Huth <address@hidden>
> > Signed-off-by: Cornelia Huck <address@hidden>
> > ---
> > hw/s390x/virtio-ccw.c | 52
> > +++++++++++++++++++++++++++++++++++++++++++++++++
> > hw/s390x/virtio-ccw.h | 5 +++++
> > 2 files changed, 57 insertions(+)
> > @@ -747,6 +797,8 @@ static int virtio_ccw_device_init(VirtioCcwDevice *dev,
> > VirtIODevice *vdev)
> > sch->id.cu_type = VIRTIO_CCW_CU_TYPE;
> > sch->id.cu_model = vdev->device_id;
> >
> > + dev->revision = -1;
> > +
> > /* Set default feature bits that are offered by the host. */
> > dev->host_features = 0;
> > virtio_add_feature(&dev->host_features, VIRTIO_F_NOTIFY_ON_EMPTY);
>
> You should also clear it on device reset.
Nope, revision survives reset and can only be cleared by disabling and
reenabling the device.
- Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout, (continued)
[Qemu-devel] [PATCH RFC v5 08/19] dataplane: allow virtio-1 devices, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 09/19] s390x/css: Add a callback for when subchannel gets disabled, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 12/19] virtio: disallow late feature changes for virtio-1, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 11/19] s390x/virtio-ccw: support virtio-1 set_vq format, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 13/19] virtio: allow to fail setting status, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 15/19] virtio-net: no writeable mac for virtio-1, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 16/19] virtio-net: support longer header, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 17/19] virtio-net: enable virtio 1.0, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 18/19] virtio: support revision-specific features, Cornelia Huck, 2014/12/02
[Qemu-devel] [PATCH RFC v5 19/19] virtio-blk: revision specific feature bits, Cornelia Huck, 2014/12/02