[libvirt] [PATCH v2 3/3] virQEMUDriverDomainABIStability: Check for memoryBacking

Daniel P. Berrange berrange at redhat.com
Wed May 24 15:06:56 UTC 2017


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.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list