diff --git a/AUTHORS b/AUTHORS index b681424bcb..74f3157746 100644 --- a/AUTHORS +++ b/AUTHORS @@ -215,6 +215,7 @@ Patches have also been contributed by: Rommer Yuri Chornoivan Deepak C Shetty + Martin Kletzander [....send patches to get your name here....] diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 180dd2bf9d..5e36270613 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8010,6 +8010,14 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, if (def->cpu == NULL) goto error; + if (def->cpu->sockets && + def->maxvcpus > + def->cpu->sockets * def->cpu->cores * def->cpu->threads) { + virDomainReportError(VIR_ERR_XML_DETAIL, "%s", + _("Maximum CPUs greater than topology limit")); + goto error; + } + if (def->cpu->cells_cpus > def->maxvcpus) { virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Number of CPUs in exceeds the"