]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
parallels: prevent domain define only if vcpupin is specified
authorMaxim Nestratov <mnestratov@parallels.com>
Tue, 10 Mar 2015 20:12:22 +0000 (23:12 +0300)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 11 Mar 2015 08:00:28 +0000 (09:00 +0100)
and their settings differ from common cpumask

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
src/parallels/parallels_sdk.c

index 4ec91617f1f24709ddceae6fc0a5b1cd28d657f5..fde908b12383f2c92b1c0b2d15e90aebd51ff92e 100644 (file)
@@ -1808,14 +1808,24 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
     if (def->cputune.shares ||
         def->cputune.sharesSpecified ||
         def->cputune.period ||
-        def->cputune.quota ||
-        def->cputune.nvcpupin) {
+        def->cputune.quota) {
 
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("cputune is not supported by parallels driver"));
         return -1;
     }
 
+    if (def->cputune.vcpupin) {
+       for (i = 0; i < def->vcpus; i++) {
+            if (!virBitmapEqual(def->cpumask,
+                                def->cputune.vcpupin[i]->cpumask)) {
+                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                               "%s", _("vcpupin cpumask differs from default cpumask"));
+                return -1;
+            }
+        }
+    }
+
 
     /*
      * Though we don't support NUMA configuration at the moment