On 6/5/25 1:35 PM, Eugenio Pérez wrote:
QEMU's shadow virtqueue and VDUSE exposes this as read-only. If we
don't change it, vhost_iova_to_vva do not consider them as valid and
returns that they're not found.
Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
Cc: [email protected]
Signed-off-by: Eugenio Pérez <[email protected]>
---
lib/vhost/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 95a99bace6..a2e3e2635d 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -544,7 +544,7 @@ vring_translate_packed(struct virtio_net *dev, struct
vhost_virtqueue *vq)
size = req_size;
vq->driver_event = (struct vring_packed_desc_event *)(uintptr_t)
vhost_iova_to_vva(dev, vq, vq->ring_addrs.avail_user_addr,
- &size, VHOST_ACCESS_RW);
+ &size, VHOST_ACCESS_RO);
if (!vq->driver_event || size != req_size)
return -1;
Squashed into patch 1.
Thanks,
Maxime