6ae9ed
From 892ee6bfd6f0a459b16c9bede5a4af83f76ccd22 Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <892ee6bfd6f0a459b16c9bede5a4af83f76ccd22@dist-git>
6ae9ed
From: Peter Krempa <pkrempa@redhat.com>
6ae9ed
Date: Fri, 26 Aug 2016 15:45:26 -0400
6ae9ed
Subject: [PATCH] conf: Don't validate vcpu count in XML parser
6ae9ed
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
6ae9ed
6ae9ed
Validating the vcpu count is more intricate and doing it in the XML
6ae9ed
parser will make previously valid configs (with older qemus) vanish.
6ae9ed
6ae9ed
Now that we have a very similar check in the qemu domain validation
6ae9ed
callback we can do it in a more appropriate place.
6ae9ed
6ae9ed
This basically reverts commit b54de0830a.
6ae9ed
6ae9ed
Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370066
6ae9ed
6ae9ed
(cherry picked from commit c9cb35c255222be7c972f1e049e297517aa84b42)
6ae9ed
---
6ae9ed
 src/conf/domain_conf.c | 9 ---------
6ae9ed
 1 file changed, 9 deletions(-)
6ae9ed
6ae9ed
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
6ae9ed
index d3a0400..9c49ba7 100644
6ae9ed
--- a/src/conf/domain_conf.c
6ae9ed
+++ b/src/conf/domain_conf.c
6ae9ed
@@ -16413,15 +16413,6 @@ virDomainDefParseXML(xmlDocPtr xml,
6ae9ed
 
6ae9ed
         if (def->cpu == NULL)
6ae9ed
             goto error;
6ae9ed
-
6ae9ed
-        if (def->cpu->sockets &&
6ae9ed
-            virDomainDefGetVcpusMax(def) >
6ae9ed
-            def->cpu->sockets * def->cpu->cores * def->cpu->threads) {
6ae9ed
-            virReportError(VIR_ERR_XML_DETAIL, "%s",
6ae9ed
-                           _("Maximum CPUs greater than topology limit"));
6ae9ed
-            goto error;
6ae9ed
-        }
6ae9ed
-
6ae9ed
     }
6ae9ed
 
6ae9ed
     if (virDomainNumaDefCPUParseXML(def->numa, ctxt) < 0)
6ae9ed
-- 
6ae9ed
2.10.0
6ae9ed