]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
vfio: Make migration support experimental
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 9 Nov 2020 18:56:02 +0000 (11:56 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 23 Nov 2020 15:29:29 +0000 (08:29 -0700)
Support for migration of vfio devices is still in flux.  Developers
are attempting to add support for new devices and new architectures,
but none are yet readily available for validation.  We have concerns
whether we're transferring device resources at the right point in the
migration, whether we're guaranteeing that updates during pre-copy are
migrated, and whether we can provide bit-stream compatibility should
any of this change.  Even the question of whether devices should
participate in dirty page tracking during pre-copy seems contentious.
In short, migration support has not had enough soak time and it feels
premature to mark it as supported.

Create an experimental option such that we can continue to develop.

[Retaining previous acks/reviews for a previously identical code
 change with different specifics in the commit log.]

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/migration.c
hw/vfio/pci.c
include/hw/vfio/vfio-common.h

index 55261562d4f3585bd62e4cd3470092d0a6f84b3b..00daa50ed81890b8d9f9fd7d381b0078d71843f2 100644 (file)
@@ -882,7 +882,7 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
     Error *local_err = NULL;
     int ret = -ENOTSUP;
 
-    if (!container->dirty_pages_supported) {
+    if (!vbasedev->enable_migration || !container->dirty_pages_supported) {
         goto add_blocker;
     }
 
index 58c0ce8971e3d7d7c422491b7aaa3f2433fbacbb..1349b900e5135b00e92fe08939adb631bdaef65e 100644 (file)
@@ -3194,6 +3194,8 @@ static Property vfio_pci_dev_properties[] = {
                     VFIO_FEATURE_ENABLE_REQ_BIT, true),
     DEFINE_PROP_BIT("x-igd-opregion", VFIOPCIDevice, features,
                     VFIO_FEATURE_ENABLE_IGD_OPREGION_BIT, false),
+    DEFINE_PROP_BOOL("x-enable-migration", VFIOPCIDevice,
+                     vbasedev.enable_migration, false),
     DEFINE_PROP_BOOL("x-no-mmap", VFIOPCIDevice, vbasedev.no_mmap, false),
     DEFINE_PROP_BOOL("x-balloon-allowed", VFIOPCIDevice,
                      vbasedev.ram_block_discard_allowed, false),
index baeb4dcff1025bb55c4469adcede992cdbc73d53..2119872c8af13c6ea3e586268451617a69ebd1e9 100644 (file)
@@ -123,6 +123,7 @@ typedef struct VFIODevice {
     bool needs_reset;
     bool no_mmap;
     bool ram_block_discard_allowed;
+    bool enable_migration;
     VFIODeviceOps *ops;
     unsigned int num_irqs;
     unsigned int num_regions;