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: 08ed673901
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Han Han <hhan@redhat.com>
This commit is contained in:
Michal Privoznik 2020-11-25 11:38:22 +01:00
parent 4a76baceb5
commit 299d0ea888

View File

@ -24204,6 +24204,12 @@ virDomainMemoryDefCheckABIStability(virDomainMemoryDefPtr src,
"source NVDIMM readonly flag")); "source NVDIMM readonly flag"));
return false; 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); return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info);