[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/7] vdpa: use virtio_ops->should_enable at vhost_vdpa_set_vrings
From: |
Eugenio Pérez |
Subject: |
[PATCH 3/7] vdpa: use virtio_ops->should_enable at vhost_vdpa_set_vrings_ready |
Date: |
Fri, 28 Jul 2023 19:20:24 +0200 |
This allow to skip some rings that qemu does not want to enable.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
hw/virtio/vhost-vdpa.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index bebcc9fe7c..1281502a71 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -896,6 +896,11 @@ static int vhost_vdpa_set_vrings_ready(struct vhost_dev
*dev)
assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_VDPA);
+ if (v->virtio_ops && v->virtio_ops->should_enable
+ && !(v->virtio_ops->should_enable(v))) {
+ return 0;
+ }
+
for (i = 0; i < dev->nvqs; ++i) {
vhost_vdpa_set_vring_ready(v, dev->vq_index + i);
}
--
2.39.3
- [PATCH 0/7] Enable vdpa net migration with features depending on CVQ, Eugenio Pérez, 2023/07/28
- [PATCH 2/7] vdpa: add should_enable op, Eugenio Pérez, 2023/07/28
- [PATCH 1/7] vdpa: export vhost_vdpa_set_vring_ready, Eugenio Pérez, 2023/07/28
- [PATCH 3/7] vdpa: use virtio_ops->should_enable at vhost_vdpa_set_vrings_ready,
Eugenio Pérez <=
- [PATCH 4/7] vdpa: add stub vhost_vdpa_should_enable, Eugenio Pérez, 2023/07/28
- [PATCH 5/7] vdpa: delay enable of data vqs, Eugenio Pérez, 2023/07/28
- [PATCH 6/7] vdpa: enable cvq svq if data vq are shadowed, Eugenio Pérez, 2023/07/28
- [PATCH 7/7] vdpa: remove net cvq migration blocker, Eugenio Pérez, 2023/07/28
- Re: [PATCH 0/7] Enable vdpa net migration with features depending on CVQ, Jason Wang, 2023/07/31