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 <[email protected]> Signed-off-by: Jane Malalane <[email protected]> --- CC: Jan Beulich <[email protected]> CC: Andrew Cooper <[email protected]> CC: "Roger Pau Monné" <[email protected]> CC: Wei Liu <[email protected]> --- 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
