qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v4 2/5] vhost: Write descriptors to packed svq


From: Sahil Siddiq
Subject: Re: [RFC v4 2/5] vhost: Write descriptors to packed svq
Date: Wed, 11 Dec 2024 21:28:52 +0530
User-agent: Mozilla Thunderbird

Hi,

On 12/10/24 2:24 PM, Eugenio Perez Martin wrote:
On Thu, Dec 5, 2024 at 9:35 PM Sahil Siddiq <icegambit91@gmail.com> wrote:

This commit is the first in a series to add support for packed
virtqueues in vhost_shadow_virtqueue.

This patch implements the insertion of available buffers in the
descriptor area. It takes into account descriptor chains, but does
not consider indirect descriptors.

Also validate svq-specific features that vdpa supports.

Signed-off-by: Sahil Siddiq <sahilcdq@proton.me>
---
Changes v3 -> v4:
- Split commit #1 in v3 into 2 commits.
- vhost-shadow-virtqueue.c
   (vhost_svq_valid_features): Add enums.

  hw/virtio/vhost-shadow-virtqueue.c | 83 +++++++++++++++++++++++++++++-
  1 file changed, 81 insertions(+), 2 deletions(-)

diff --git a/hw/virtio/vhost-shadow-virtqueue.c 
b/hw/virtio/vhost-shadow-virtqueue.c
index bb7cf6d5db..6eee01ab3c 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -33,6 +33,9 @@ bool vhost_svq_valid_features(uint64_t features, Error **errp)
           ++b) {
          switch (b) {
          case VIRTIO_F_ANY_LAYOUT:
+        case VIRTIO_F_RING_PACKED:
+        case VIRTIO_F_RING_RESET:
+        case VIRTIO_RING_F_INDIRECT_DESC:
          case VIRTIO_RING_F_EVENT_IDX:

This is good, but it should be added in the last commit. Otherwise
we're enabling packed vq without the code to handle it.

The rest looks good to me.


Got it. I'll make this change before sending the next patch
series.

Thanks,
Sahil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]