[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/3] conf: Do not allow vcpupin's cpuid exceed current vcpus number



Setting pinning policy for vcpu which exceed current vcpus number
makes no sense, and it could cause problem for APIs which
associate the vcpu thread id with cgroup.
---
 src/conf/domain_conf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 33e1e7f..87e0c6b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8746,9 +8746,9 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
     if (n && VIR_ALLOC_N(def->cputune.vcpupin, n) < 0)
         goto no_memory;
 
-    if (n > def->maxvcpus) {
+    if (n > def->vcpus) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("vcpupin nodes must be less than maxvcpus"));
+                       "%s", _("vcpupin nodes must be less than current vcpus"));
         goto error;
     }
 
-- 
1.7.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]