
On Wed, May 24, 2017 at 16:06:56 +0100, Daniel Berrange wrote:
On Wed, May 24, 2017 at 04:45:57PM +0200, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1450349
Problem is, qemu fails to load guest memory image if these attribute change on migration/restore from an image.
[snip]
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 35fd79de8..c1ff8ca8a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5797,6 +5797,46 @@ qemuDomainUpdateMemoryDeviceInfo(virQEMUDriverPtr driver, }
+static bool +qemuDomainABIStabilityCheck(const virDomainDef *src, + const virDomainDef *dst) +{ + if (src->mem.source != dst->mem.source) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target memoryBacking source '%s' doesn't " + "match source memoryBacking source'%s'"), + virDomainMemorySourceTypeToString(dst->mem.source), + virDomainMemorySourceTypeToString(src->mem.source)); + return false; + } + + if (src->mem.access != dst->mem.access) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target memoryBacking access '%s' doesn't " + "match access memoryBacking access'%s'"), + virDomainMemoryAccessTypeToString(dst->mem.access), + virDomainMemoryAccessTypeToString(src->mem.access)); + return false; + } + + if (src->mem.allocation != dst->mem.allocation) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target memoryBacking allocation '%s' doesn't " + "match allocation memoryBacking allocation'%s'"), + virDomainMemoryAllocationTypeToString(dst->mem.allocation), + virDomainMemoryAllocationTypeToString(src->mem.allocation)); + return false; + }
Do we really need to blacklist all of these changes. I can understand that changing the memory source would affect migration ABI, as it causes us to use the memory backend command line config differently.
Assuming that matches though, I'm sceptical that changing 'access' or 'allocation' affects ABI.
If it does, a comment should state when it's required. (e.g. access may need to be checked, since shared access may force usage of memory-backend-file). Allocation is indeed weird.