This causes errors on virtio modern devices on big endian hosts Signed-off-by: Eugenio Pérez <epere...@redhat.com> --- hw/virtio/vhost-shadow-virtqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c index 18a49e1ecb..3131903edd 100644 --- a/hw/virtio/vhost-shadow-virtqueue.c +++ b/hw/virtio/vhost-shadow-virtqueue.c @@ -231,7 +231,8 @@ static void vhost_svq_kick(VhostShadowVirtqueue *svq) size_t num = svq->vring.num; uint16_t *avail_event = (uint16_t *)&svq->vring.used->ring[num]; - needs_kick = vring_need_event(*avail_event, svq->shadow_avail_idx, + needs_kick = vring_need_event(le16_to_cpu(*avail_event), + svq->shadow_avail_idx, svq->shadow_avail_idx - 1); } else { needs_kick = !(svq->vring.used->flags & VRING_USED_F_NO_NOTIFY); -- 2.31.1