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 0026B46A9C for ; Mon, 30 Jun 2025 14:26:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECC4840661; Mon, 30 Jun 2025 14:26:19 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 2F15F40654 for ; Mon, 30 Jun 2025 14:26:18 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3a4ef2c2ef3so1863489f8f.2 for ; Mon, 30 Jun 2025 05:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286378; x=1751891178; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cU+K/umiUoPX86bnOCNlmBCU5qZ0IaYBDorARWT/IHo=; b=eu4OJWd+BqgdMi4soOgUEL2z3mde7geHrF78zbCom9CHj1PuxZp8GiOK6Fr6hdh9Kg wPAiCPgVTrij9RX/ihlDOXJRX9Crbmb8dIf61sPQ9lMXeES6fMNKsPPphjeQi9rvVtid JlZhWFJXfXdS6w5LOD9jhV2Gmn5epMPQ3rxCKEgSL4RbwGgFvASz9TexwqSJwfDc9yYQ pzrbL0AaLx00kUi+OH8OJ9MWEKzO7lZ5f5lYrUjvZEgAAQeo4u9EFzkLatFrRnsx+40K HpiBAYxKnpEuBELb4027iibH4qN5MtqbaTBPnMqNZJlaEWOR21CZ27caDtHJlxKFM3XI kLFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286378; x=1751891178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cU+K/umiUoPX86bnOCNlmBCU5qZ0IaYBDorARWT/IHo=; b=T7fUg7c93F5RLUuEKIDeSrNgBZktRUWON79hSEBbZzzr/rDeA0GJQAvTeOmETknO1c HWh0uzSSykuEGGXBpJOmD87l0LMwHYnN1KtTY9nmEEDmbAhuxhGMqeiUtCobt0xwTWoQ QQYHtgNn3IrPLM7W4GgByS8CcyhVykpZDoTRxemfNrzcIfvNUR50kdg1MKGSssXWOKtB fNSdg+8CFbiX6d2eGxtDofaUbspWYFdCyD5PsR6pDBhCsUxUxtzZdhu9/8EqXfCd4O2x W+kQprOySH/GuOXNFqameH0t4Kar3ks+yMInu4TPecH+hqSc/cAGeke5srpe3MyC/rk/ G+bA== X-Forwarded-Encrypted: i=1; AJvYcCXBrj7XuxQ9HBDVGepsSAFigZ0BjmTf/lECwtUa9i0W5VAp02BWOrzlYpyZMsHQ+dWpdjUACGw=@dpdk.org X-Gm-Message-State: AOJu0YxO0G2XzU4MWmY+TaQcd9PBagB6toXk5xOyOA5MmAQHIPamPmOV g32n8PPGDdG+7YRamv3cpz9zU5AYQhiqFexvmYxbfQfLmGkTDS4a4D64vADxskwA X-Gm-Gg: ASbGncs/V8uBOQDnrSagOrRuAowENunRgi5br6tZk4Vr1WqgJh2UuuUCGaXu55v3ua3 L5iQQDuDkpy3j+mW7O81yl+H0/OjArBrpeeTq1t8vqzCCHVYHAEbUtk0h6Xp9G4O5u5B2M0fO9B yXvSGWOh0i4n1hURSOqDjgZr3J/c0VSHpalu9SjE+jcC9yCfu6wR/ByZKeozZNnPzYPN6T2CY8u d7w1/DjDzopvUCTfrwIMnHb/jaThcD0uGBXDIHCPBDfFcmUSv88BN6UbeeXvGSSA5lQaleUlBrg exMA7shlBX7P3OMMA+tdSAeAeuHD9q/8xcaG9wPd5lAXN3bsZS6skyfcurhGuhX59UE= X-Google-Smtp-Source: AGHT+IE3V2+AkNRR6PEvNVWyq/tqTUbcB3jNYbZEteYmoNYF612kAgqncKpp2imSaXWoEqZtbGGcew== X-Received: by 2002:a5d:5f91:0:b0:3a4:d6ed:8e2e with SMTP id ffacd0b85a97d-3a8fe4bd067mr10754126f8f.41.1751286377573; Mon, 30 Jun 2025 05:26:17 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a892e52ad2sm10157603f8f.48.2025.06.30.05.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:26:16 -0700 (PDT) From: luca.boccassi@gmail.com 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 22.11.9 Date: Mon, 30 Jun 2025 13:25:38 +0100 Message-ID: <20250630122556.1133654-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250630122556.1133654-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> <20250630122556.1133654-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 22.11.9 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/02/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/23fcc2ae023513a18068bc729ef4fc63b327d5dc Thanks. Luca Boccassi --- >From 23fcc2ae023513a18068bc729ef4fc63b327d5dc 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 662f7f3f11..53781f23af 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -474,7 +474,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; @@ -485,7 +485,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; @@ -521,7 +521,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.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:22.083810869 +0100 +++ 0008-vhost-search-virtqueues-driver-data-in-read-only-are.patch 2025-06-30 13:21:21.747057360 +0100 @@ -1 +1 @@ -From 3bd0c97b56c8e3c198d604871f35c125afdc4dc4 Mon Sep 17 00:00:00 2001 +From 23fcc2ae023513a18068bc729ef4fc63b327d5dc 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 662f7f3f11..53781f23af 100644 @@ -33 +34 @@ -@@ -497,7 +497,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq) +@@ -474,7 +474,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq) @@ -42 +43 @@ -@@ -508,7 +508,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq) +@@ -485,7 +485,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq) @@ -51 +52 @@ -@@ -544,7 +544,7 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq) +@@ -521,7 +521,7 @@ vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)