patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Eugenio Pérez" <eperezma@redhat.com>
To: dev@dpdk.org
Cc: Chenbo Xia <chenbox@nvidia.com>,
	stable@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [PATCH 2/2] vhost: search the packed vq driver area in RO areas
Date: Thu,  5 Jun 2025 13:35:52 +0200	[thread overview]
Message-ID: <20250605113552.918120-3-eperezma@redhat.com> (raw)
In-Reply-To: <20250605113552.918120-1-eperezma@redhat.com>

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@dpdk.org

Signed-off-by: Eugenio Pérez <eperezma@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


  parent reply	other threads:[~2025-06-05 11:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 11:35 [PATCH 0/2] Search the split vq desc and avail " Eugenio Pérez
2025-06-05 11:35 ` [PATCH 1/2] vhost: search " Eugenio Pérez
2025-06-05 11:35 ` Eugenio Pérez [this message]
2025-06-05 11:50 ` [PATCH 0/2] Search " David Marchand
2025-06-05 14:54   ` Eugenio Perez Martin
2025-06-06 14:20     ` David Marchand
2025-06-06 15:10       ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250605113552.918120-3-eperezma@redhat.com \
    --to=eperezma@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).