This is not a bug. The xen cmdline can request both a NUMA restriction
and a vcpu count restriction for Dom0. The node restriction wil always
be respected which might mean either using dom0_max_vcpus <
opt_dom0_max_vcpus_max or using more vCPUs than pCPUs on a node. In
the case where dom0_max_vcpus gets capped at the maximum number of
pCPUs for the number of nodes chosen, it can be useful particularly
for debugging to print a message in the serial log.

Suggested-by: Edwin Torok <edvin.to...@citrix.com>
Signed-off-by: Jane Malalane <jane.malal...@citrix.com>
---
CC: Jan Beulich <jbeul...@suse.com>
CC: Andrew Cooper <andrew.coop...@citrix.com>
CC: "Roger Pau Monné" <roger....@citrix.com>
CC: Wei Liu <w...@xen.org>
---
 xen/arch/x86/dom0_build.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index fe24e11b37..e57cc80ef0 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -240,6 +240,11 @@ unsigned int __init dom0_max_vcpus(void)
     if ( max_vcpus > limit )
         max_vcpus = limit;
 
+    if ( max_vcpus < opt_dom0_max_vcpus_max && max_vcpus > 
opt_dom0_max_vcpus_min )
+        printk(XENLOG_INFO "Dom0 using %d vCPUs conflicts with request to use"
+               " %d node(s), using up to %d vCPUs\n", opt_dom0_max_vcpus_max,
+               dom0_nr_pxms, max_vcpus);
+
     return max_vcpus;
 }
 
-- 
2.11.0


Reply via email to