[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/PVHv2: fix dom0_max_vcpus so it's capped to HVM_MAX_VCPUS for PVHv2 Dom0
commit e1037b514598d02f7c90b9e67c8b634b67cf2cdc Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Mon Feb 13 15:23:34 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Feb 13 15:23:34 2017 +0100 x86/PVHv2: fix dom0_max_vcpus so it's capped to HVM_MAX_VCPUS for PVHv2 Dom0 PVHv2 Dom0 is limited to 128 vCPUs, as are all HVM guests at the moment. Fix dom0_max_vcpus so it takes this limitation into account. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/domain_build.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index 7123931..0134428 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -38,6 +38,7 @@ #include <asm/hpet.h> #include <public/version.h> +#include <public/hvm/hvm_info_table.h> static long __initdata dom0_nrpages; static long __initdata dom0_min_nrpages; @@ -149,7 +150,7 @@ static nodemask_t __initdata dom0_nodes; unsigned int __init dom0_max_vcpus(void) { - unsigned int i, max_vcpus; + unsigned int i, max_vcpus, limit; nodeid_t node; for ( i = 0; i < dom0_nr_pxms; ++i ) @@ -169,8 +170,9 @@ unsigned int __init dom0_max_vcpus(void) max_vcpus = opt_dom0_max_vcpus_min; if ( opt_dom0_max_vcpus_max < max_vcpus ) max_vcpus = opt_dom0_max_vcpus_max; - if ( max_vcpus > MAX_VIRT_CPUS ) - max_vcpus = MAX_VIRT_CPUS; + limit = dom0_pvh ? HVM_MAX_VCPUS : MAX_VIRT_CPUS; + if ( max_vcpus > limit ) + max_vcpus = limit; return max_vcpus; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |