]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Don't validate vcpu count in XML parser
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Aug 2016 19:24:22 +0000 (15:24 -0400)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 26 Aug 2016 15:26:59 +0000 (11:26 -0400)
Validating the vcpu count is more intricate and doing it in the XML
parser will make previously valid configs (with older qemus) vanish.

Now that we have a very similar check in the qemu domain validation
callback we can do it in a more appropriate place.

This basically reverts commit b54de0830a.

Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370066

src/conf/domain_conf.c

index 17c2f5396608304e6809194b4353c923be606a52..ae3eb14c5a38efc69f4b15bf61c7fcbf665267c2 100644 (file)
@@ -16376,15 +16376,6 @@ virDomainDefParseXML(xmlDocPtr xml,
 
         if (def->cpu == NULL)
             goto error;
-
-        if (def->cpu->sockets &&
-            virDomainDefGetVcpusMax(def) >
-            def->cpu->sockets * def->cpu->cores * def->cpu->threads) {
-            virReportError(VIR_ERR_XML_DETAIL, "%s",
-                           _("Maximum CPUs greater than topology limit"));
-            goto error;
-        }
-
     }
 
     if (virDomainNumaDefCPUParseXML(def->numa, ctxt) < 0)