[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 32/33] vfio/migration: Add x-migration-multifd-transfer VFIO p
From: |
Maciej S. Szmigiero |
Subject: |
[PATCH v4 32/33] vfio/migration: Add x-migration-multifd-transfer VFIO property |
Date: |
Thu, 30 Jan 2025 11:08:53 +0100 |
From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
This property allows configuring at runtime whether to transfer the
particular device state via multifd channels when live migrating that
device.
It defaults to AUTO, which means that VFIO device state transfer via
multifd channels is attempted in configurations that otherwise support it.
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
---
hw/vfio/pci.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 2700b355ecf1..cd24f386aaf9 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3353,6 +3353,8 @@ static void vfio_instance_init(Object *obj)
pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
}
+static PropertyInfo qdev_prop_on_off_auto_mutable;
+
static const Property vfio_pci_dev_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host),
DEFINE_PROP_UUID_NODEFAULT("vf-token", VFIOPCIDevice, vf_token),
@@ -3377,6 +3379,10 @@ static const Property vfio_pci_dev_properties[] = {
VFIO_FEATURE_ENABLE_IGD_OPREGION_BIT, false),
DEFINE_PROP_ON_OFF_AUTO("enable-migration", VFIOPCIDevice,
vbasedev.enable_migration, ON_OFF_AUTO_AUTO),
+ DEFINE_PROP("x-migration-multifd-transfer", VFIOPCIDevice,
+ vbasedev.migration_multifd_transfer,
+ qdev_prop_on_off_auto_mutable, OnOffAuto,
+ .set_default = true, .defval.i = ON_OFF_AUTO_AUTO),
DEFINE_PROP_ON_OFF_AUTO("x-migration-load-config-after-iter",
VFIOPCIDevice,
vbasedev.migration_load_config_after_iter,
ON_OFF_AUTO_AUTO),
@@ -3477,6 +3483,9 @@ static const TypeInfo vfio_pci_nohotplug_dev_info = {
static void register_vfio_pci_dev_type(void)
{
+ qdev_prop_on_off_auto_mutable = qdev_prop_on_off_auto;
+ qdev_prop_on_off_auto_mutable.realized_set_allowed = true;
+
type_register_static(&vfio_pci_dev_info);
type_register_static(&vfio_pci_nohotplug_dev_info);
}
- [PATCH v4 22/33] vfio/migration: Convert bytes_transferred counter to atomic, (continued)
- [PATCH v4 22/33] vfio/migration: Convert bytes_transferred counter to atomic, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 23/33] vfio/migration: Multifd device state transfer support - basic types, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 24/33] vfio/migration: Multifd device state transfer support - VFIOStateBuffer(s), Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 25/33] vfio/migration: Multifd device state transfer - add support checking function, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 26/33] vfio/migration: Multifd device state transfer support - receive init/cleanup, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 27/33] vfio/migration: Multifd device state transfer support - received buffers queuing, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 28/33] vfio/migration: Multifd device state transfer support - load thread, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 29/33] vfio/migration: Multifd device state transfer support - config loading support, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 30/33] migration/qemu-file: Define g_autoptr() cleanup function for QEMUFile, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 31/33] vfio/migration: Multifd device state transfer support - send side, Maciej S. Szmigiero, 2025/01/30
- [PATCH v4 32/33] vfio/migration: Add x-migration-multifd-transfer VFIO property,
Maciej S. Szmigiero <=
- [PATCH v4 33/33] hw/core/machine: Add compat for x-migration-multifd-transfer VFIO property, Maciej S. Szmigiero, 2025/01/30
- Re: [PATCH v4 00/33] Multifd 🔀 device state transfer support with VFIO consumer, Fabiano Rosas, 2025/01/30