From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E70D46BAE for ; Fri, 18 Jul 2025 21:36:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 396B540E4F; Fri, 18 Jul 2025 21:36:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C922540E41 for ; Fri, 18 Jul 2025 21:36:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v8y6eKKNxQCqBJQ99yiMLtlhy7NKq671EpJLZH1Iqfc=; b=DyBNcry4QLuojoQ2/y4Fdg9CczgPU+2zixz1jJf6OqkzhGHusje7BsK7+y1+I/Zdl6dBHl DWZ9QJ/ARLFLkMq6L8fu+qjqPcTzmh4B0Tt4Ai7jIhzsGpQQ1NW3uCX45Ou8qgt/Z+8HlA il84BzLWX60XolRiFN8Ih0VD2U9j4DM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-1MxZ47GyPmyaBBDpfauxTA-1; Fri, 18 Jul 2025 15:36:52 -0400 X-MC-Unique: 1MxZ47GyPmyaBBDpfauxTA-1 X-Mimecast-MFC-AGG-ID: 1MxZ47GyPmyaBBDpfauxTA_1752867411 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4B3691956080 for ; Fri, 18 Jul 2025 19:36:51 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7769918003FC; Fri, 18 Jul 2025 19:36:49 +0000 (UTC) From: Kevin Traynor To: =?UTF-8?q?Eugenio=20P=C3=A9rez?= Cc: Maxime Coquelin , dpdk stable Subject: patch 'vhost: search virtqueues driver data in read-only area' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:30:47 +0100 Message-ID: <20250718193247.1008129-113-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0a_0gZuWzCWYTPuZZaUqMa4BA7tidjay6LaFRVfHIeA_1752867411 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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?= 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 Reviewed-by: Maxime Coquelin --- 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@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)