[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 17/18] vdpa: use shadow_data instead of first device v->shado
|
From: |
Eugenio Pérez |
|
Subject: |
[RFC PATCH 17/18] vdpa: use shadow_data instead of first device v->shadow_vqs_enabled |
|
Date: |
Thu, 19 Oct 2023 16:34:54 +0200 |
Previously we trusted vq_index == 0 will be started first. By the end of
this series this might not be true, so let's check proper shadow_data
for this.
---
hw/virtio/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index bfbe4673af..1f2ef953f6 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -802,7 +802,7 @@ static int vhost_vdpa_set_features(struct vhost_dev *dev,
return 0;
}
- if (v->shadow_vqs_enabled) {
+ if (v->shared->shadow_data) {
if ((v->acked_features ^ features) == BIT_ULL(VHOST_F_LOG_ALL)) {
/*
* QEMU is just trying to enable or disable logging. SVQ handles
@@ -1353,7 +1353,7 @@ static int vhost_vdpa_set_log_base(struct vhost_dev *dev,
uint64_t base,
struct vhost_log *log)
{
struct vhost_vdpa *v = dev->opaque;
- if (v->shadow_vqs_enabled || !vhost_vdpa_first_dev(dev)) {
+ if (v->shared->shadow_data || !vhost_vdpa_first_dev(dev)) {
return 0;
}
--
2.39.3
- [RFC PATCH 06/18] vdpa: move file descriptor to vhost_vdpa_shared, (continued)
- [RFC PATCH 06/18] vdpa: move file descriptor to vhost_vdpa_shared, Eugenio Pérez, 2023/10/19
- [RFC PATCH 09/18] vdpa: remove msg type of vhost_vdpa, Eugenio Pérez, 2023/10/19
- [RFC PATCH 10/18] vdpa: move iommu_list to vhost_vdpa_shared, Eugenio Pérez, 2023/10/19
- [RFC PATCH 11/18] vdpa: use VhostVDPAShared in vdpa_dma_map and unmap, Eugenio Pérez, 2023/10/19
- [RFC PATCH 08/18] vdpa: move backend_cap to vhost_vdpa_shared, Eugenio Pérez, 2023/10/19
- [RFC PATCH 13/18] vdpa: move memory listener to vhost_vdpa_shared, Eugenio Pérez, 2023/10/19
- [RFC PATCH 14/18] vdpa: do not set virtio status bits if unneeded, Eugenio Pérez, 2023/10/19
- [RFC PATCH 16/18] vdpa: add vhost_vdpa_net_load_setup NetClient callback, Eugenio Pérez, 2023/10/19
- [RFC PATCH 15/18] vdpa: add vhost_vdpa_load_setup, Eugenio Pérez, 2023/10/19
- [RFC PATCH 12/18] vdpa: use dev_shared in vdpa_iommu, Eugenio Pérez, 2023/10/19
- [RFC PATCH 17/18] vdpa: use shadow_data instead of first device v->shadow_vqs_enabled,
Eugenio Pérez <=
- [RFC PATCH 18/18] virtio_net: register incremental migration handlers, Eugenio Pérez, 2023/10/19