[PATCH 2/2] vhost: search the packed vq driver area in RO areas
Eugenio Pérez
eperezma at redhat.com
Thu Jun 5 13:35:52 CEST 2025
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: stable at dpdk.org
Signed-off-by: Eugenio Pérez <eperezma at redhat.com>
---
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;
--
2.49.0
More information about the dev
mailing list