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: