# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID 095b61cf2934618684e3ec49cc8d1fb02089beba # Parent cc94ab1e0de09c9cb557492719de1fac3a3fbf10 Increase MAX_VIRT_CPUS and NR_CPUS to 64. Check maxcpus < MAX_VIRT_CPUS. Check size of shared_info (<= PAGE_SIZE). Signed-off-by: Tristan Gingold diff -r cc94ab1e0de0 -r 095b61cf2934 xen/arch/ia64/asm-offsets.c --- a/xen/arch/ia64/asm-offsets.c Thu Apr 6 21:51:59 2006 +++ b/xen/arch/ia64/asm-offsets.c Fri Apr 7 06:45:07 2006 @@ -30,6 +30,7 @@ DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack)); DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64)); DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info)); + DEFINE(SHARED_INFO_SIZE, sizeof (struct shared_info)); BLANK(); #ifdef VTI_DEBUG diff -r cc94ab1e0de0 -r 095b61cf2934 xen/arch/ia64/xen/xensetup.c --- a/xen/arch/ia64/xen/xensetup.c Thu Apr 6 21:51:59 2006 +++ b/xen/arch/ia64/xen/xensetup.c Fri Apr 7 06:45:07 2006 @@ -24,6 +24,12 @@ #include #include +/* Be sure the struct shared_info fits on a page because it is mapped in + domain. */ +#if SHARED_INFO_SIZE > PAGE_SIZE + #error "struct shared_info does not not fit in PAGE_SIZE" +#endif + 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 cc94ab1e0de0 -r 095b61cf2934 xen/include/asm-ia64/config.h --- a/xen/include/asm-ia64/config.h Thu Apr 6 21:51:59 2006 +++ b/xen/include/asm-ia64/config.h Fri Apr 7 06:45:07 2006 @@ -25,17 +25,12 @@ #ifdef CONFIG_XEN_SMP #define CONFIG_SMP 1 -#define NR_CPUS 8 -#define CONFIG_NR_CPUS 8 +#define NR_CPUS 64 #else #undef CONFIG_SMP #define NR_CPUS 1 -#define CONFIG_NR_CPUS 1 -#endif -//#define NR_CPUS 16 -//#define CONFIG_NR_CPUS 16 -//leave SMP for a later time -//#undef CONFIG_SMP +#endif +#define CONFIG_NR_CPUS NR_CPUS #define supervisor_mode_kernel (0) @@ -121,9 +116,6 @@ #define CMPXCHG_BUGCHECK_DECL // from include/asm-ia64/smp.h -#ifdef CONFIG_SMP -//#warning "Lots of things to fix to enable CONFIG_SMP!" -#endif #define get_cpu() smp_processor_id() #define put_cpu() do {} while(0) @@ -284,13 +276,6 @@ #endif /* __ASSEMBLY__ */ #endif /* __XEN_IA64_CONFIG_H__ */ -// needed for include/xen/smp.h -//#ifdef CONFIG_SMP -//#define raw_smp_processor_id() current->processor -//#else -//#define raw_smp_processor_id() 0 -//#endif - #ifndef __ASSEMBLY__ #include #define FORCE_CRASH() asm("break.m 0;;"); diff -r cc94ab1e0de0 -r 095b61cf2934 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Thu Apr 6 21:51:59 2006 +++ b/xen/include/public/arch-ia64.h Fri Apr 7 06:45:07 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__