[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 3/8] vhost: expose memory listener priority
From: |
Eugenio Pérez |
Subject: |
[RFC 3/8] vhost: expose memory listener priority |
Date: |
Wed, 10 Aug 2022 20:42:15 +0200 |
We need to perform changes to vhost_vdpa devices before the memory
listener inform them about the migration. Otherwise, it will reach them
with no SVQ enabled and it cannot be guaranteed that it will be enabled
afterwards.
Expose the vhost memory listener priority so we can assign a lower one
to net/vhost-vdpa one.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/hw/virtio/vhost.h | 2 ++
hw/virtio/vhost.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index a346f23d13..ccd6cc5549 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -104,6 +104,8 @@ struct vhost_dev {
const VhostDevConfigOps *config_ops;
};
+#define VHOST_DEV_MEMORY_LISTENER_PRIORITY 10
+
extern const VhostOps kernel_ops;
extern const VhostOps user_ops;
extern const VhostOps vdpa_ops;
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 0827d631c0..a1e822b871 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1411,7 +1411,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
.log_global_stop = vhost_log_global_stop,
.eventfd_add = vhost_eventfd_add,
.eventfd_del = vhost_eventfd_del,
- .priority = 10
+ .priority = VHOST_DEV_MEMORY_LISTENER_PRIORITY
};
hdev->iommu_listener = (MemoryListener) {
--
2.31.1
- [RFC 2/8] vdpa: Extract get_backend_features from vhost_vdpa_get_as_num, (continued)
[RFC 1/8] [NOTMERGE] Update linux headers, Eugenio Pérez, 2022/08/10
[RFC 7/8] vdpa: Add feature_log member to vhost_vdpa, Eugenio Pérez, 2022/08/10
[RFC 3/8] vhost: expose memory listener priority,
Eugenio Pérez <=
[RFC 8/8] vdpa: Conditionally expose _F_LOG in vhost_net devices, Eugenio Pérez, 2022/08/10
[RFC 6/8] vdpa: Negotiate _F_SUSPEND feature, Eugenio Pérez, 2022/08/10