From d51e6092ed7977daf662ed1def0f6cd5cc6ba33d Mon Sep 17 00:00:00 2001 Message-Id: From: Laine Stump Date: Wed, 27 Jul 2022 12:14:10 -0400 Subject: [PATCH] qemu: don't call qemuMigrationSrcIsAllowedHostdev() from qemuMigrationDstPrepareFresh() This call to qemuMigrationSrcIsAllowedHostdev() (which does a hardcoded fail of the migration if there is any PCI or mdev hostdev device in the domain) while doing the destination side of migration prep was found once the call to that same function was removed from the source side migration prep (commit 25883cd5). According to jdenemar, for the V2 migration protocol, prep of the destination is the first step, so this *was* the proper place to do the check, but for V3 migration this is in a way redundant (since we will have already done the check on the source side (updated by 25883cd5 to query QEMU rather than do a hardcoded fail)). Of course it's possible that the source could support migration of a particular VFIO device, but the destination doesn't. But the current check on the destination side is worthless even in that case, since it is just *always* failing rather than querying QEMU; and QEMU can't be queried at the point where the destination check is happening, since it isn't yet running. Anyway QEMU should complain when it's started if it's going to fail, so removing this check should just move the failure to happen a bit later. So the best solution to this problem is to simply remove the hardcoded check/fail from qemuMigrationDstPrepareFresh() and rely on QEMU to fail if it needs to. Fixes: 25883cd5f0b188f2417f294b7d219a77b219f7c2 Signed-off-by: Laine Stump Reviewed-by: Jiri Denemark (cherry picked from commit 640d185f01858b7a8db401235c929ac4798592d0) https://bugzilla.redhat.com/show_bug.cgi?id=1497907 Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 61fcaf4258..e3ba4c3f78 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3382,9 +3382,6 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, QEMU_MIGRATION_COOKIE_CAPS; } - if (!qemuMigrationSrcIsAllowedHostdev(*def)) - goto cleanup; - /* Let migration hook filter domain XML */ if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) { g_autofree char *xml = NULL; -- 2.35.1