summary refs log tree commit diff stats
path: root/hw/vfio/pci.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2023-03-07 09:53:46 -0700
committerAlex Williamson <alex.williamson@redhat.com>2023-03-07 11:19:07 -0700
commit8249cffc626d0661d6c109aa0653cd9bb67cd676 (patch)
treee2b02cb851986b0d4385c519f9a23f7241b4beca /hw/vfio/pci.c
parent333f988d19878f6b96388a1a797c4e90e7ea0a69 (diff)
downloadfocaccia-qemu-8249cffc626d0661d6c109aa0653cd9bb67cd676.tar.gz
focaccia-qemu-8249cffc626d0661d6c109aa0653cd9bb67cd676.zip
vfio/migration: Rename entry points
Pick names that align with the section drivers should use them from,
avoiding the confusion of calling a _finalize() function from _exit()
and generalizing the actual _finalize() to handle removing the viommu
blocker.

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Link: https://lore.kernel.org/r/167820912978.606734.12740287349119694623.stgit@omen
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r--hw/vfio/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 30a271eab3..ec9a854361 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3145,7 +3145,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
     }
 
     if (!pdev->failover_pair_id) {
-        ret = vfio_migration_probe(vbasedev, errp);
+        ret = vfio_migration_realize(vbasedev, errp);
         if (ret) {
             error_report("%s: Migration disabled", vbasedev->name);
         }
@@ -3185,7 +3185,7 @@ static void vfio_instance_finalize(Object *obj)
      */
     vfio_put_device(vdev);
     vfio_put_group(group);
-    vfio_unblock_giommu_migration();
+    vfio_migration_finalize();
 }
 
 static void vfio_exitfn(PCIDevice *pdev)
@@ -3204,7 +3204,7 @@ static void vfio_exitfn(PCIDevice *pdev)
     }
     vfio_teardown_msi(vdev);
     vfio_bars_exit(vdev);
-    vfio_migration_finalize(&vdev->vbasedev);
+    vfio_migration_exit(&vdev->vbasedev);
 }
 
 static void vfio_pci_reset(DeviceState *dev)