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 6568054d7d..9c4bdf1ee4 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7997,12 +7997,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 */
@@ -8018,7 +8020,8 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDriverPtr driver,
bool
qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
virDomainDefPtr src,
- virDomainDefPtr dst)
+ virDomainDefPtr dst,
+ unsigned int flags)
{
virDomainDefPtr migratableDefSrc = NULL;
virDomainDefPtr migratableDefDst = NULL;
@@ -8030,7 +8033,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
ret = qemuDomainMigratableDefCheckABIStability(driver,
src, migratableDefSrc,
- dst, migratableDefDst);
+ dst, migratableDefDst,
+ flags);
cleanup:
virDomainDefFree(migratableDefSrc);
@@ -8042,7 +8046,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
bool
qemuDomainCheckABIStability(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- virDomainDefPtr dst)
+ virDomainDefPtr dst,
+ unsigned int flags)
{
virDomainDefPtr migratableSrc = NULL;
virDomainDefPtr migratableDst = NULL;
@@ -8056,7 +8061,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 21e12f6594..73463a681e 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -718,11 +718,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 3fede93687..261b680775 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3387,7 +3387,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;
}
@@ -15885,9 +15885,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 256b994bd9..a949104f5a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2163,7 +2163,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);
@@ -2715,7 +2715,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