From: Michal Privoznik Date: Wed, 25 Nov 2020 10:38:22 +0000 (+0100) Subject: domain_conf: Check NVDIMM UUID in ABI stability X-Git-Tag: v7.0.0-rc1~316 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=299d0ea888eaefa6ee801fa13ca71813127a9fc3;p=thirdparty%2Flibvirt.git domain_conf: Check NVDIMM UUID in ABI stability The UUID is guest visible and thus shouldn't change if we want to not break guest ABI. Fixes: 08ed673901bb5b4f419b37bcce9b11d31ce370e6 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza Tested-by: Han Han --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 425e3c3710..d8df18b542 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24204,6 +24204,12 @@ virDomainMemoryDefCheckABIStability(virDomainMemoryDefPtr src, "source NVDIMM readonly flag")); return false; } + + if (memcmp(src->uuid, dst->uuid, VIR_UUID_BUFLEN) != 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target NVDIMM UUID doesn't match source NVDIMM")); + return false; + } } return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info);