On Thu, 4 Dec 2014 18:20:05 +0200 "Michael S. Tsirkin" <mst@xxxxxxxxxx> wrote: > On Tue, Dec 02, 2014 at 02:00:18PM +0100, Cornelia Huck wrote: > > From: Thomas Huth <thuth@xxxxxxxxxxxxxxxxxx> > > > > 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 <thuth@xxxxxxxxxxxxxxxxxx> > > Signed-off-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx> > > --- > > 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. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html