qemu-devel
[Top][All Lists]
Advanced

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

[RFC PATCH v5 19/26] vdpa: ack VIRTIO_F_QUEUE_STATE if device supports i


From: Eugenio Pérez
Subject: [RFC PATCH v5 19/26] vdpa: ack VIRTIO_F_QUEUE_STATE if device supports it
Date: Fri, 29 Oct 2021 20:35:18 +0200

This is needed to enable or disable SVQ.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 hw/virtio/vhost-vdpa.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index c2580693b3..fc8396ba8a 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -521,6 +521,9 @@ static int vhost_vdpa_set_features(struct vhost_dev *dev,
     if (vhost_vdpa_one_time_request(dev)) {
         return 0;
     }
+    if (dev->features & BIT_ULL(VIRTIO_F_QUEUE_STATE)) {
+        features |= BIT_ULL(VIRTIO_F_QUEUE_STATE);
+    }
 
     trace_vhost_vdpa_set_features(dev, features);
     ret = vhost_vdpa_call(dev, VHOST_SET_FEATURES, &features);
-- 
2.27.0




reply via email to

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