Allow the caller to qemuDomainMigratableDefCheckABIStability to also
provide a flag to be used for virDomainDefCheckABIStabilityFlags.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_domain.c | 18 ++++++++++++------
src/qemu/qemu_domain.h | 6 ++++--
src/qemu/qemu_driver.c | 7 ++++---
src/qemu/qemu_migration.c | 4 ++--
4 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ed7bd0230e..f584768895 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8013,12 +8013,14 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDriverPtr driver,
virDomainDefPtr src,
virDomainDefPtr migratableSrc,
virDomainDefPtr dst,
- virDomainDefPtr migratableDst)
+ virDomainDefPtr migratableDst,
+ unsigned flags)
{
+ flags |= VIR_DOMAIN_DEF_ABI_CHECK_SKIP_VOLATILE;
if (!virDomainDefCheckABIStabilityFlags(migratableSrc,
migratableDst,
driver->xmlopt,
- VIR_DOMAIN_DEF_ABI_CHECK_SKIP_VOLATILE))
+ flags))
return false;
/* Force update any skipped values from the volatile flag */
@@ -8034,7 +8036,8 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDriverPtr driver,
bool
qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
virDomainDefPtr src,
- virDomainDefPtr dst)
+ virDomainDefPtr dst,
+ unsigned int flags)
{
virDomainDefPtr migratableDefSrc = NULL;
virDomainDefPtr migratableDefDst = NULL;
@@ -8046,7 +8049,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
ret = qemuDomainMigratableDefCheckABIStability(driver,
src, migratableDefSrc,
- dst, migratableDefDst);
+ dst, migratableDefDst,
+ flags);
cleanup:
virDomainDefFree(migratableDefSrc);
@@ -8058,7 +8062,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
bool
qemuDomainCheckABIStability(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- virDomainDefPtr dst)
+ virDomainDefPtr dst,
+ unsigned int flags)
{
virDomainDefPtr migratableSrc = NULL;
virDomainDefPtr migratableDst = NULL;
@@ -8072,7 +8077,8 @@ qemuDomainCheckABIStability(virQEMUDriverPtr driver,
ret = qemuDomainMigratableDefCheckABIStability(driver,
vm->def, migratableSrc,
- dst, migratableDst);
+ dst, migratableDst,
+ flags);
cleanup:
VIR_FREE(xml);
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 2c27dfb9f3..789e7b403c 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -719,11 +719,13 @@ int qemuDomainUpdateMemoryDeviceInfo(virQEMUDriverPtr driver,
bool qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
virDomainDefPtr src,
- virDomainDefPtr dst);
+ virDomainDefPtr dst,
+ unsigned int flags);
bool qemuDomainCheckABIStability(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- virDomainDefPtr dst);
+ virDomainDefPtr dst,
+ unsigned int flags);
bool qemuDomainAgentAvailable(virDomainObjPtr vm,
bool reportError);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2863508189..61e49bea24 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3366,7 +3366,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE))) {
goto endjob;
}
- if (!qemuDomainCheckABIStability(driver, vm, def)) {
+ if (!qemuDomainCheckABIStability(driver, vm, def, 0)) {
virDomainDefFree(def);
goto endjob;
}
@@ -15893,9 +15893,10 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
goto endjob;
compatible = qemuDomainDefCheckABIStability(driver, vm->def,
- config);
+ config, 0);
} else {
- compatible = qemuDomainCheckABIStability(driver, vm, config);
+ compatible = qemuDomainCheckABIStability(driver, vm, config,
+ 0);
}
if (!compatible) {
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 88b8253fa9..e1aa3a3368 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1954,7 +1954,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto cleanup;
- if (!qemuDomainCheckABIStability(driver, vm, def))
+ if (!qemuDomainCheckABIStability(driver, vm, def, 0))
goto cleanup;
rv = qemuDomainDefFormatLive(driver, def, NULL, false, true);
@@ -2258,7 +2258,7 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
if (!newdef)
goto cleanup;
- if (!qemuDomainDefCheckABIStability(driver, *def, newdef)) {
+ if (!qemuDomainDefCheckABIStability(driver, *def, newdef, 0)) {
virDomainDefFree(newdef);
goto cleanup;
}
--
2.13.6