Hi,

On 12/10/24 2:24 PM, Eugenio Perez Martin wrote:
On Thu, Dec 5, 2024 at 9:35 PM Sahil Siddiq <icegambi...@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 <sahil...@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