summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2024-07-22 22:13:25 +0100
committerCédric Le Goater <clg@redhat.com>2024-07-23 17:14:53 +0200
commitf48b472450efd086dec2e32dc93c882a62a53649 (patch)
treeded7e43a266b8b0a9f27edc88e2cd51dbbb32252
parent7c30710bd99510b1ce91a1b287118c759c55a495 (diff)
downloadfocaccia-qemu-f48b472450efd086dec2e32dc93c882a62a53649.tar.gz
focaccia-qemu-f48b472450efd086dec2e32dc93c882a62a53649.zip
vfio/migration: Don't block migration device dirty tracking is unsupported
By default VFIO migration is set to auto, which will support live
migration if the migration capability is set *and* also dirty page
tracking is supported.

For testing purposes one can force enable without dirty page tracking
via enable-migration=on, but that option is generally left for testing
purposes.

So starting with IOMMU dirty tracking it can use to accommodate the lack of
VF dirty page tracking allowing us to minimize the VF requirements for
migration and thus enabling migration by default for those too.

While at it change the error messages to mention IOMMU dirty tracking as
well.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
[ clg: - spelling in commit log ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
-rw-r--r--hw/vfio/migration.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 34d4be2ce1..cbfaef7aff 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -1036,16 +1036,16 @@ bool vfio_migration_realize(VFIODevice *vbasedev, Error **errp)
         return !vfio_block_migration(vbasedev, err, errp);
     }
 
-    if (!vbasedev->dirty_pages_supported) {
+    if (!vbasedev->dirty_pages_supported && !vbasedev->iommu_dirty_tracking) {
         if (vbasedev->enable_migration == ON_OFF_AUTO_AUTO) {
             error_setg(&err,
-                       "%s: VFIO device doesn't support device dirty tracking",
-                       vbasedev->name);
+                       "%s: VFIO device doesn't support device and "
+                       "IOMMU dirty tracking", vbasedev->name);
             goto add_blocker;
         }
 
-        warn_report("%s: VFIO device doesn't support device dirty tracking",
-                    vbasedev->name);
+        warn_report("%s: VFIO device doesn't support device and "
+                    "IOMMU dirty tracking", vbasedev->name);
     }
 
     ret = vfio_block_multiple_devices_migration(vbasedev, errp);