From: Jiri Denemark Date: Tue, 9 May 2017 14:03:19 +0000 (+0200) Subject: conf: Check CPU cache for ABI stability X-Git-Tag: v3.4.0-rc1~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9cf6e09ce242c94731bd21707dd3bcd41f854f;p=thirdparty%2Flibvirt.git conf: Check CPU cache for ABI stability Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrange --- diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 1b098c4766..a4be5742e3 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -915,6 +915,16 @@ virCPUDefIsEqual(virCPUDefPtr src, } } + if ((src->cache && !dst->cache) || + (!src->cache && dst->cache) || + (src->cache && dst->cache && + (src->cache->level != dst->cache->level || + src->cache->mode != dst->cache->mode))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target CPU cache does not match source")); + goto cleanup; + } + identical = true; cleanup: