qemu-devel
[Top][All Lists]
Advanced

[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.




reply via email to

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