ia64/xen-unstable

changeset 8798:6ba371536f5c

Add 'dom0_max_vcpus' Xen boot parameter.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Feb 08 17:25:14 2006 +0100 (2006-02-08)
parents a3d554557d48
children b246f429f683
files xen/arch/x86/domain_build.c
line diff
     1.1 --- a/xen/arch/x86/domain_build.c	Wed Feb 08 17:24:29 2006 +0100
     1.2 +++ b/xen/arch/x86/domain_build.c	Wed Feb 08 17:25:14 2006 +0100
     1.3 @@ -50,10 +50,13 @@ static void parse_dom0_mem(char *s)
     1.4  }
     1.5  custom_param("dom0_mem", parse_dom0_mem);
     1.6  
     1.7 -static unsigned int opt_dom0_shadow = 0;
     1.8 +static unsigned int opt_dom0_max_vcpus;
     1.9 +integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
    1.10 +
    1.11 +static unsigned int opt_dom0_shadow;
    1.12  boolean_param("dom0_shadow", opt_dom0_shadow);
    1.13  
    1.14 -static unsigned int opt_dom0_translate = 0;
    1.15 +static unsigned int opt_dom0_translate;
    1.16  boolean_param("dom0_translate", opt_dom0_translate);
    1.17  
    1.18  static char opt_dom0_ioports_disable[200] = "";
    1.19 @@ -594,7 +597,13 @@ int construct_dom0(struct domain *d,
    1.20      for ( i = 0; i < MAX_VIRT_CPUS; i++ )
    1.21          d->shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
    1.22  
    1.23 -    for ( i = 1; i < num_online_cpus(); i++ )
    1.24 +    if ( opt_dom0_max_vcpus == 0 )
    1.25 +        opt_dom0_max_vcpus = num_online_cpus();
    1.26 +    if ( opt_dom0_max_vcpus > MAX_VIRT_CPUS )
    1.27 +        opt_dom0_max_vcpus = MAX_VIRT_CPUS;
    1.28 +    printk("Dom0 has maximum %u VCPUs\n", opt_dom0_max_vcpus);
    1.29 +
    1.30 +    for ( i = 1; i < opt_dom0_max_vcpus; i++ )
    1.31          (void)alloc_vcpu(d, i, i);
    1.32  
    1.33      /* Set up monitor table */