patch 'vhost: search virtqueues driver data in read-only area' has been queued to stable release 23.11.5

Xueming Li xuemingl at nvidia.com
Wed Jul 30 16:56:20 CEST 2025


Hi,

FYI, your patch has been queued to stable release 23.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/10/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a02ed54577eb2ae1640355dadf9e2ad817c30ec2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a02ed54577eb2ae1640355dadf9e2ad817c30ec2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma at redhat.com>
Date: Thu, 5 Jun 2025 13:35:51 +0200
Subject: [PATCH] vhost: search virtqueues driver data in read-only area
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 ]

The virtqueues driver areas are read-only for the device.
While they are exposed as Read/Write to Vhost-user and
regular VDUSE backends, they are only exposed as Read-only
when the control Virtqueue is shadowed by QEMU with VDUSE
backend.

This patch makes the backend to request these areas as
Read-only, so that it can be accessed in all the
configurations.

Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")
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>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/vhost/vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 276c5f12b7..29d2d4d205 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -495,7 +495,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	size = req_size;
 	vq->desc = (struct vring_desc *)(uintptr_t)vhost_iova_to_vva(dev, vq,
 						vq->ring_addrs.desc_user_addr,
-						&size, VHOST_ACCESS_RW);
+						&size, VHOST_ACCESS_RO);
 	if (!vq->desc || size != req_size)
 		return -1;
 
@@ -506,7 +506,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	size = req_size;
 	vq->avail = (struct vring_avail *)(uintptr_t)vhost_iova_to_vva(dev, vq,
 						vq->ring_addrs.avail_user_addr,
-						&size, VHOST_ACCESS_RW);
+						&size, VHOST_ACCESS_RO);
 	if (!vq->avail || size != req_size)
 		return -1;
 
@@ -542,7 +542,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-30 22:50:03.839294499 +0800
+++ 0011-vhost-search-virtqueues-driver-data-in-read-only-are.patch	2025-07-30 22:50:03.004753249 +0800
@@ -1 +1 @@
-From 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 Mon Sep 17 00:00:00 2001
+From a02ed54577eb2ae1640355dadf9e2ad817c30ec2 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 ]
@@ -30 +33 @@
-index 0353a04dc8..a2e3e2635d 100644
+index 276c5f12b7..29d2d4d205 100644
@@ -33 +36 @@
-@@ -497,7 +497,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -495,7 +495,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -42 +45 @@
-@@ -508,7 +508,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -506,7 +506,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -51 +54 @@
-@@ -544,7 +544,7 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -542,7 +542,7 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)


More information about the stable mailing list