]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
parallels: prevent domain define only if NUMA is really specified
authorMaxim Nestratov <mnestratov@parallels.com>
Tue, 10 Mar 2015 20:12:21 +0000 (23:12 +0300)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 11 Mar 2015 08:00:28 +0000 (09:00 +0100)
Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
src/parallels/parallels_sdk.c

index 5a3969ea6a6ee46997dad52e9d3608fbcbe31fda..4ec91617f1f24709ddceae6fc0a5b1cd28d657f5 100644 (file)
@@ -1816,7 +1816,15 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
         return -1;
     }
 
-    if (def->numa) {
+
+    /*
+     * Though we don't support NUMA configuration at the moment
+     * virDomainDefPtr always contain non zero NUMA configuration
+     * So, just make sure this configuration does't differ from auto generated.
+     */
+    if ((virDomainNumatuneGetMode(def->numa, -1) !=
+         VIR_DOMAIN_NUMATUNE_MEM_STRICT) ||
+         virDomainNumatuneHasPerNodeBinding(def->numa)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                         _("numa parameters are not supported "
                           "by parallels driver"));