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

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:30:47 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/23/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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a9dd00834294c645f287c18bda2ce89af0c7069e

Thanks.

Kevin

---
>From a9dd00834294c645f287c18bda2ce89af0c7069e 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

[ 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")

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 c41c29ca57..71bde74c34 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -497,5 +497,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	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;
@@ -508,5 +508,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	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;
@@ -544,5 +544,5 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	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.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:14.952593429 +0100
+++ 0113-vhost-search-virtqueues-driver-data-in-read-only-are.patch	2025-07-18 20:29:11.053907708 +0100
@@ -1 +1 @@
-From 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 Mon Sep 17 00:00:00 2001
+From a9dd00834294c645f287c18bda2ce89af0c7069e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
-index 0353a04dc8..a2e3e2635d 100644
+index c41c29ca57..71bde74c34 100644
@@ -33 +34 @@
-@@ -498,5 +498,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -497,5 +497,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -40 +41 @@
-@@ -509,5 +509,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -508,5 +508,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -47 +48 @@
-@@ -545,5 +545,5 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -544,5 +544,5 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)



More information about the stable mailing list