* [PATCH] vhost: accept indirect descriptors in shadow virtqueue
@ 2025-12-01 12:51 Eugenio Pérez
2025-12-04 2:16 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Eugenio Pérez @ 2025-12-01 12:51 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Lei Yang, Eugenio Pérez,
Stefano Garzarella, Jason Wang
The device is not able to generate indirect descriptors by itself, only
the driver can do it. And SVQ is already able to handle them by reusing
VirtQueue struct.
Shadow VirtQueue just transform the indirect descriptors to chained
buffers. This way we don't need to map a new buffer for the indirect
table and handle its exhaustion etc. As they are only used in control
plane and HW devices don't like indirect, we should not see significant
downsides with these.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
--
Tested functionally by forwarding the CVQ descriptors.
---
hw/virtio/vhost-shadow-virtqueue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c
index 2481d49345..6242aeb69c 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -34,6 +34,7 @@ bool vhost_svq_valid_features(uint64_t features, Error **errp)
switch (b) {
case VIRTIO_F_ANY_LAYOUT:
case VIRTIO_RING_F_EVENT_IDX:
+ case VIRTIO_RING_F_INDIRECT_DESC:
continue;
case VIRTIO_F_ACCESS_PLATFORM:
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vhost: accept indirect descriptors in shadow virtqueue
2025-12-01 12:51 [PATCH] vhost: accept indirect descriptors in shadow virtqueue Eugenio Pérez
@ 2025-12-04 2:16 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2025-12-04 2:16 UTC (permalink / raw)
To: Eugenio Pérez
Cc: qemu-devel, Michael S. Tsirkin, Lei Yang, Stefano Garzarella
On Mon, Dec 1, 2025 at 8:51 PM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> The device is not able to generate indirect descriptors by itself, only
> the driver can do it. And SVQ is already able to handle them by reusing
> VirtQueue struct.
>
> Shadow VirtQueue just transform the indirect descriptors to chained
> buffers. This way we don't need to map a new buffer for the indirect
> table and handle its exhaustion etc. As they are only used in control
> plane and HW devices don't like indirect, we should not see significant
> downsides with these.
>
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> --
>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-04 2:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 12:51 [PATCH] vhost: accept indirect descriptors in shadow virtqueue Eugenio Pérez
2025-12-04 2:16 ` Jason Wang
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).