From: Maxim Nestratov Date: Tue, 10 Mar 2015 20:12:22 +0000 (+0300) Subject: parallels: prevent domain define only if vcpupin is specified X-Git-Tag: v1.2.14-rc1~214 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0473e1bb16695943cf0fc56852e8506779d49c76;p=thirdparty%2Flibvirt.git parallels: prevent domain define only if vcpupin is specified and their settings differ from common cpumask Signed-off-by: Maxim Nestratov --- diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 4ec91617f1..fde908b123 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -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