# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID 65b3a99122e57f0c227cb984b4f2065fe1cba556 # Parent 40d96f4e9fcb9d31aca61ef9553c77e12b599e18 Increase MAX_VIRT_CPUS to 64. Add checks: max_cpus <= MAX_VIRT_CPUS, sizeof (shared_info_t) <= PAGE_SIZE. Signed-off-by: Tristan Gingold diff -r 40d96f4e9fcb -r 65b3a99122e5 xen/arch/ia64/xen/xensetup.c --- a/xen/arch/ia64/xen/xensetup.c Mon Apr 3 20:39:27 2006 +++ b/xen/arch/ia64/xen/xensetup.c Tue Apr 4 03:57:29 2006 @@ -24,6 +24,12 @@ #include #include +/* Be sure the struct shared_info fits on a page because it is mapped in + domain. + This is a static check. */ +extern char assert_struct_shared_info_fits_on_a_page + [(sizeof (struct shared_info) <= PAGE_SIZE) ? 1 : -1]; + unsigned long xenheap_phys_end; char saved_command_line[COMMAND_LINE_SIZE]; @@ -321,7 +327,13 @@ //boot_cpu_data.x86_num_cores = 1; } + /* A vcpu is created for the idle domain on every physical cpu. + Limit the number of cpus to the maximum number of vcpus. */ + if (max_cpus > MAX_VIRT_CPUS) + max_cpus = MAX_VIRT_CPUS; + smp_prepare_cpus(max_cpus); + /* We aren't hotplug-capable yet. */ for_each_cpu ( i ) cpu_set(i, cpu_present_map); diff -r 40d96f4e9fcb -r 65b3a99122e5 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Mon Apr 3 20:39:27 2006 +++ b/xen/include/public/arch-ia64.h Tue Apr 4 03:57:29 2006 @@ -31,7 +31,7 @@ /* Maximum number of virtual CPUs in multi-processor guests. */ /* WARNING: before changing this, check that shared_info fits on a page */ -#define MAX_VIRT_CPUS 4 +#define MAX_VIRT_CPUS 64 #ifndef __ASSEMBLY__