debuggers.hg

view xen/include/asm-ia64/config.h @ 19826:2f9e1348aa98

x86_64: allow more vCPU-s per guest

Since the shared info layout is fixed, guests are required to use
VCPUOP_register_vcpu_info prior to booting any vCPU beyond the
traditional limit of 32.

MAX_VIRT_CPUS, being an implemetation detail of the hypervisor, is no
longer being exposed in the public headers.

The tools changes are clearly incomplete (and done only so things
would
build again), and the current state of the tools (using scalar
variables all over the place to represent vCPU bitmaps) very likely
doesn't permit booting DomU-s with more than the traditional number of
vCPU-s. Testing of the extended functionality was done with Dom0 (96
vCPU-s, as well as 128 vCPU-s out of which the kernel elected - by way
of a simple kernel side patch - to use only some, resulting in a
sparse
bitmap).

ia64 changes only to make things build, and build-tested only (and the
tools part only as far as the build would go without encountering
unrelated problems in the blktap code).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 18 10:14:16 2009 +0100 (2009-06-18)
parents c8962b24fb50
children 809b20f066fb
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #undef DEBUG_PFMON
6 // manufactured from component pieces
8 // defined in linux/arch/ia64/defconfig
9 #define CONFIG_IA64_GENERIC
10 #define CONFIG_HZ 32
12 #define CONFIG_IA64_L1_CACHE_SHIFT 7
13 // needed by include/asm-ia64/page.h
14 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
15 #define CONFIG_IA64_GRANULE_16MB
17 // this needs to be on to run on system with large memory hole
18 #define CONFIG_VIRTUAL_FRAME_TABLE
20 #define CONFIG_EFI
21 #define CONFIG_EFI_PCDP
22 #define CONFIG_SERIAL_SGI_L1_CONSOLE
24 #define CONFIG_XEN_SMP
26 #ifdef CONFIG_XEN_SMP
27 #define CONFIG_SMP 1
28 #define CONFIG_HOTPLUG_CPU 1
29 #ifdef MAX_PHYS_CPUS
30 #define NR_CPUS MAX_PHYS_CPUS
31 #else
32 #define NR_CPUS 64
33 #endif
34 #define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
35 #define CONFIG_NUMA
36 #define CONFIG_ACPI_NUMA
37 #define NODES_SHIFT 8 /* linux/asm/numnodes.h */
38 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) /* linux-xen/asm/acpi.h */
39 #else
40 #undef CONFIG_SMP
41 #define NR_CPUS 1
42 #endif
43 #define CONFIG_NR_CPUS NR_CPUS
45 #define CONFIG_IOSAPIC
46 #define supervisor_mode_kernel (0)
48 #define PADDR_BITS 48
50 /* If PERFC is used, include privop maps. */
51 #ifdef PERF_COUNTERS
52 #define CONFIG_PRIVOP_ADDRS
53 #define PRIVOP_COUNT_NADDRS 30
54 #endif
56 #define CONFIG_VGA 1
59 #define NR_hypercalls 64
61 /* PV domains use this value for priv. level 0 emulation */
62 #define CONFIG_CPL0_EMUL 1
64 #ifndef __ASSEMBLY__
66 // can't find where this typedef was before?!?
67 // needed by include/asm-ia64/processor.h (and other places)
68 typedef int pid_t;
70 // now needed for xen/include/mm.h
71 typedef unsigned long paddr_t;
72 #define INVALID_PADDR (~0UL)
73 // from include/linux/kernel.h
74 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
76 //////////////////////////////////////
78 #define FASTCALL(x) x // see linux/include/linux/linkage.h
79 #define fastcall // " "
81 #define watchdog_disable() ((void)0)
82 #define watchdog_enable() ((void)0)
83 // from linux/include/linux/types.h
84 #define CLEAR_BITMAP(name,bits) \
85 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
87 // FIXME?: x86-ism used in xen/mm.h
88 #define LOCK_PREFIX
90 extern unsigned long total_pages;
91 extern unsigned long xen_pstart;
92 extern unsigned long xenheap_size;
94 extern int running_on_sim;
96 // from linux/include/linux/mm.h
97 extern struct page_info *mem_map;
99 // xen/include/asm/config.h
100 extern char _end[]; /* standard ELF symbol */
102 // linux/include/linux/compiler.h
103 //#define __kernel
104 //#define __safe
105 #define __force
106 #define __chk_user_ptr(x) (void)0
107 //#define __chk_io_ptr(x) (void)0
108 //#define __builtin_warning(x, y...) (1)
109 //#define __acquires(x)
110 //#define __releases(x)
111 //#define __acquire(x) (void)0
112 //#define __release(x) (void)0
113 //#define __cond_lock(x) (x)
114 //#define __must_check
115 #define __deprecated
117 // xen/include/asm/config.h
118 //#define HZ 1000
119 // FIXME SMP: leave SMP for a later time
120 ///////////////////////////////////////////////////////////////
121 // xen/include/asm/config.h
122 #define ELFSIZE 64
124 ///////////////////////////////////////////////////////////////
126 // get rid of difficult circular include dependency
127 #define CMPXCHG_BUGCHECK(v)
128 #define CMPXCHG_BUGCHECK_DECL
130 // from include/asm-ia64/smp.h
131 #define get_cpu() smp_processor_id()
132 #define put_cpu() do {} while(0)
133 #define put_cpu_no_resched() do{} while (0)
135 // needed for common/dom0_ops.c until hyperthreading is supported
136 #ifdef CONFIG_SMP
137 extern int smp_num_siblings;
138 #else
139 #define smp_num_siblings 1
140 #endif
142 // function calls; see decl in xen/include/xen/sched.h
143 #undef free_task_struct
144 #undef alloc_task_struct
145 #define get_thread_info(v) alloc_thread_info(v)
147 // avoid redefining task_t in asm/thread_info.h
148 #define task_t struct domain
150 // avoid redefining task_struct in asm/current.h
151 #define task_struct vcpu
153 #include <xen/cache.h>
154 #ifndef CONFIG_SMP
155 #define __cacheline_aligned_in_smp
156 #else
157 #define __cacheline_aligned_in_smp __cacheline_aligned
158 #endif
160 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
161 #ifndef CONFIG_SMP
162 #define ____cacheline_aligned_in_smp
163 #else
164 #define ____cacheline_aligned_in_smp ____cacheline_aligned
165 #endif
167 #define CONFIG_PERFMON
169 #ifndef __ASSEMBLY__
170 #include "asm/types.h" // for u64
171 #include "linux/linkage.h" // for asmlinkage which is used by
172 // xen/include/acpi/acpixf.h
173 #endif
175 // warning: unless search_extable is declared, the return value gets
176 // truncated to 32-bits, causing a very strange error in privop handling
177 struct exception_table_entry;
179 const struct exception_table_entry *
180 search_extable(const struct exception_table_entry *first,
181 const struct exception_table_entry *last,
182 unsigned long value);
183 void sort_extable(struct exception_table_entry *start,
184 struct exception_table_entry *finish);
185 void sort_main_extable(void);
187 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
189 // see drivers/char/console.c
190 #define OPT_CONSOLE_STR "com1"
192 #define __nocast
194 // see include/asm-x86/atomic.h (different from standard linux)
195 #define _atomic_set(v,i) (((v).counter) = (i))
196 #define _atomic_read(v) ((v).counter)
197 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
199 // Deprivated linux inf and put here for short time compatibility
200 #define kmalloc(s, t) xmalloc_bytes((s))
201 #define kfree(s) xfree((s))
202 #define kzalloc(size, flags) \
203 ({ \
204 unsigned char *mem; \
205 mem = (unsigned char *)xmalloc_bytes(size); \
206 if (mem) \
207 memset(mem, 0, size); \
208 (void *)mem; \
209 })
210 #define kcalloc(n, size, flags) kzalloc(n * size, flags)
211 #define alloc_bootmem_node(pg, size) xmalloc_bytes(size)
213 // see common/keyhandler.c
214 #define nop() asm volatile ("nop 0")
216 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
217 #define preempt_enable() do { } while (0)
218 #define preempt_disable() do { } while (0)
220 // needed for include/xen/linuxtime.h
221 typedef s64 time_t;
222 typedef s64 suseconds_t;
224 // needed for include/linux/jiffies.h
225 typedef long clock_t;
227 // from include/linux/kernel.h, needed by jiffies.h
228 #define typecheck(type,x) \
229 ({ type __dummy; \
230 typeof(x) __dummy2; \
231 (void)(&__dummy == &__dummy2); \
232 1; \
233 })
235 // from include/linux/timex.h, needed by arch/ia64/time.c
236 #define TIME_SOURCE_CPU 0
238 // used in common code
239 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
241 // dup'ed from signal.h to avoid changes to includes
242 #define SA_SHIRQ 0x04000000
243 #define SA_INTERRUPT 0x20000000
245 // needed for setup.c
246 extern unsigned long loops_per_jiffy;
247 extern char saved_command_line[];
248 struct screen_info { };
249 #define seq_printf(a,b...) printk(b)
250 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
252 #define CONFIG_SHADOW 1
254 // xen/include/asm/config.h
255 /******************************************************************************
256 * config.h
257 *
258 * A Linux-style configuration list.
259 */
261 #ifndef __XEN_IA64_CONFIG_H__
262 #define __XEN_IA64_CONFIG_H__
264 #undef CONFIG_X86
266 #define CONFIG_MCKINLEY
268 #undef CONFIG_X86_LOCAL_APIC
269 #undef CONFIG_X86_IO_APIC
270 #undef CONFIG_X86_L1_CACHE_SHIFT
272 //#ifndef CONFIG_IA64_HP_SIM
273 // looks like this is hard to turn off for Xen
274 #define CONFIG_ACPI 1
275 #define CONFIG_ACPI_BOOT 1
276 //#endif
278 #define CONFIG_XEN_ATTENTION_KEY 1
279 #endif /* __ASSEMBLY__ */
280 #endif /* __XEN_IA64_CONFIG_H__ */
282 /* Allow .serialize.data/instruction in asm files.
283 Old as doesn't handle this. */
284 #define HAVE_SERIALIZE_DIRECTIVE
286 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
287 #undef CONFIG_PRIVIFY
289 #define CONFIG_XENCOMM_MARK_DIRTY 1
291 #define ARCH_CRASH_SAVE_VMCOREINFO
293 #endif /* _IA64_CONFIG_H_ */