[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 2/5] virtio-ccw: use virtio_force_modern()
From: |
Halil Pasic |
Subject: |
[RFC PATCH v2 2/5] virtio-ccw: use virtio_force_modern() |
Date: |
Fri, 12 Nov 2021 15:57:46 +0100 |
The fact that revision > 0 was negotiated implies that VIRTIO_VERSION_1
aka modern must be used. This negotiation is done before the obligatory
reset. Let us call virtio_force_modern() after the reset if revision > 0
was negotiated, so that the VIRTIO_VERSION_1 feature can be set, and
endianness starts working as it should for devices that comply to the
virtio spec.
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
---
hw/s390x/virtio-ccw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 6a2df1c1e9..88fbe87942 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -266,6 +266,9 @@ static void virtio_ccw_reset_virtio(VirtioCcwDevice *dev,
VirtIODevice *vdev)
dev->summary_indicator = NULL;
}
ccw_dev->sch->thinint_active = false;
+ if (dev->revision > 0) {
+ virtio_force_modern(vdev);
+ }
}
static int virtio_ccw_handle_set_vq(SubchDev *sch, CCW1 ccw, bool check_len,
--
2.25.1
[RFC PATCH v2 2/5] virtio-ccw: use virtio_force_modern(),
Halil Pasic <=
[RFC PATCH v2 4/5] vhost: push features to backend on force_modern, Halil Pasic, 2021/11/12
Re: [RFC PATCH v2 0/5] virtio: early detect 'modern' virtio, Halil Pasic, 2021/11/23