ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 17571:b6aa55ca599e

shadow: track video RAM dirty bits

This adds a new HVM op that enables tracking dirty bits of a range of
video RAM. The idea is to optimize just for the most common case
(only one guest mapping, with sometimes some temporary other
mappings), which permits to keep the overhead on shadow as low as
possible.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 02 15:08:27 2008 +0100 (2008-05-02)
parents 7643472d6b43
children 611787b6ca35
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_PCDP
21 #define CONFIG_SERIAL_SGI_L1_CONSOLE
23 #define CONFIG_XEN_SMP
25 #ifdef CONFIG_XEN_SMP
26 #define CONFIG_SMP 1
27 #define CONFIG_HOTPLUG_CPU 1
28 #ifdef MAX_PHYS_CPUS
29 #define NR_CPUS MAX_PHYS_CPUS
30 #else
31 #define NR_CPUS 64
32 #endif
33 #define CONFIG_NUMA
34 #define CONFIG_ACPI_NUMA
35 #define NODES_SHIFT 8
36 #define MAX_NUMNODES (1 << NODES_SHIFT)
37 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
38 #define MAX_PXM_DOMAINS 256
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 CONFIG_DMA_BITSIZE 32
50 #define PADDR_BITS 48
52 /* If PERFC is used, include privop maps. */
53 #ifdef PERF_COUNTERS
54 #define CONFIG_PRIVOP_ADDRS
55 #define PRIVOP_COUNT_NADDRS 30
56 #endif
58 #define CONFIG_VGA 1
61 #define NR_hypercalls 64
63 /* PV domains use this value for priv. level 0 emulation */
64 #define CONFIG_CPL0_EMUL 1
66 #ifndef __ASSEMBLY__
68 // can't find where this typedef was before?!?
69 // needed by include/asm-ia64/processor.h (and other places)
70 typedef int pid_t;
72 // now needed for xen/include/mm.h
73 typedef unsigned long paddr_t;
74 #define INVALID_PADDR (~0UL)
75 // from include/linux/kernel.h
76 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
78 //////////////////////////////////////
80 #define FASTCALL(x) x // see linux/include/linux/linkage.h
81 #define fastcall // " "
83 #define watchdog_disable() ((void)0)
84 #define watchdog_enable() ((void)0)
85 // from linux/include/linux/types.h
86 #define CLEAR_BITMAP(name,bits) \
87 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
89 // FIXME?: x86-ism used in xen/mm.h
90 #define LOCK_PREFIX
92 extern unsigned long xenheap_phys_end;
93 extern unsigned long total_pages;
94 extern unsigned long xen_pstart;
95 extern unsigned long xenheap_size;
97 extern int running_on_sim;
99 // from linux/include/linux/mm.h
100 extern struct page_info *mem_map;
102 // xen/include/asm/config.h
103 extern char _end[]; /* standard ELF symbol */
105 // linux/include/linux/compiler.h
106 //#define __kernel
107 //#define __safe
108 #define __force
109 #define __chk_user_ptr(x) (void)0
110 //#define __chk_io_ptr(x) (void)0
111 //#define __builtin_warning(x, y...) (1)
112 //#define __acquires(x)
113 //#define __releases(x)
114 //#define __acquire(x) (void)0
115 //#define __release(x) (void)0
116 //#define __cond_lock(x) (x)
117 //#define __must_check
118 #define __deprecated
120 // xen/include/asm/config.h
121 //#define HZ 1000
122 // FIXME SMP: leave SMP for a later time
123 ///////////////////////////////////////////////////////////////
124 // xen/include/asm/config.h
125 // Natural boundary upon TR size to define xenheap space
126 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
127 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
128 #define ELFSIZE 64
130 ///////////////////////////////////////////////////////////////
132 // get rid of difficult circular include dependency
133 #define CMPXCHG_BUGCHECK(v)
134 #define CMPXCHG_BUGCHECK_DECL
136 // from include/asm-ia64/smp.h
137 #define get_cpu() smp_processor_id()
138 #define put_cpu() do {} while(0)
139 #define put_cpu_no_resched() do{} while (0)
141 // needed for common/dom0_ops.c until hyperthreading is supported
142 #ifdef CONFIG_SMP
143 extern int smp_num_siblings;
144 #else
145 #define smp_num_siblings 1
146 #endif
148 // function calls; see decl in xen/include/xen/sched.h
149 #undef free_task_struct
150 #undef alloc_task_struct
151 #define get_thread_info(v) alloc_thread_info(v)
153 // avoid redefining task_t in asm/thread_info.h
154 #define task_t struct domain
156 // avoid redefining task_struct in asm/current.h
157 #define task_struct vcpu
159 #include <xen/cache.h>
160 #ifndef CONFIG_SMP
161 #define __cacheline_aligned_in_smp
162 #else
163 #define __cacheline_aligned_in_smp __cacheline_aligned
164 #endif
166 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
167 #ifndef CONFIG_SMP
168 #define ____cacheline_aligned_in_smp
169 #else
170 #define ____cacheline_aligned_in_smp ____cacheline_aligned
171 #endif
173 #define CONFIG_PERFMON
175 #ifndef __ASSEMBLY__
176 #include "asm/types.h" // for u64
177 #include "linux/linkage.h" // for asmlinkage which is used by
178 // xen/include/acpi/acpixf.h
179 #endif
181 // warning: unless search_extable is declared, the return value gets
182 // truncated to 32-bits, causing a very strange error in privop handling
183 struct exception_table_entry;
185 const struct exception_table_entry *
186 search_extable(const struct exception_table_entry *first,
187 const struct exception_table_entry *last,
188 unsigned long value);
189 void sort_extable(struct exception_table_entry *start,
190 struct exception_table_entry *finish);
191 void sort_main_extable(void);
193 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
195 // see drivers/char/console.c
196 #define OPT_CONSOLE_STR "com1"
198 #define __nocast
200 // see include/asm-x86/atomic.h (different from standard linux)
201 #define _atomic_set(v,i) (((v).counter) = (i))
202 #define _atomic_read(v) ((v).counter)
203 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
205 // Deprivated linux inf and put here for short time compatibility
206 #define kmalloc(s, t) xmalloc_bytes((s))
207 #define kfree(s) xfree((s))
208 #define kzalloc(size, flags) \
209 ({ \
210 unsigned char *mem; \
211 mem = (unsigned char *)xmalloc_bytes(size); \
212 if (mem) \
213 memset(mem, 0, size); \
214 (void *)mem; \
215 })
216 #define kcalloc(n, size, flags) kzalloc(n * size, flags)
217 #define alloc_bootmem_node(pg, size) xmalloc_bytes(size)
219 // see common/keyhandler.c
220 #define nop() asm volatile ("nop 0")
222 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
223 #define preempt_enable() do { } while (0)
224 #define preempt_disable() do { } while (0)
226 // needed for include/xen/linuxtime.h
227 typedef s64 time_t;
228 typedef s64 suseconds_t;
230 // needed for include/linux/jiffies.h
231 typedef long clock_t;
233 // from include/linux/kernel.h, needed by jiffies.h
234 #define typecheck(type,x) \
235 ({ type __dummy; \
236 typeof(x) __dummy2; \
237 (void)(&__dummy == &__dummy2); \
238 1; \
239 })
241 // from include/linux/timex.h, needed by arch/ia64/time.c
242 #define TIME_SOURCE_CPU 0
244 // used in common code
245 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
247 // dup'ed from signal.h to avoid changes to includes
248 #define SA_SHIRQ 0x04000000
249 #define SA_INTERRUPT 0x20000000
251 // needed for setup.c
252 extern unsigned long loops_per_jiffy;
253 extern char saved_command_line[];
254 struct screen_info { };
255 #define seq_printf(a,b...) printk(b)
256 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
258 #define CONFIG_SHADOW 1
260 // xen/include/asm/config.h
261 /******************************************************************************
262 * config.h
263 *
264 * A Linux-style configuration list.
265 */
267 #ifndef __XEN_IA64_CONFIG_H__
268 #define __XEN_IA64_CONFIG_H__
270 #undef CONFIG_X86
272 #define CONFIG_MCKINLEY
274 #undef CONFIG_X86_LOCAL_APIC
275 #undef CONFIG_X86_IO_APIC
276 #undef CONFIG_X86_L1_CACHE_SHIFT
278 //#ifndef CONFIG_IA64_HP_SIM
279 // looks like this is hard to turn off for Xen
280 #define CONFIG_ACPI 1
281 #define CONFIG_ACPI_BOOT 1
282 //#endif
284 #define CONFIG_XEN_ATTENTION_KEY 1
285 #endif /* __ASSEMBLY__ */
286 #endif /* __XEN_IA64_CONFIG_H__ */
288 /* Allow .serialize.data/instruction in asm files.
289 Old as doesn't handle this. */
290 #define HAVE_SERIALIZE_DIRECTIVE
292 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
293 #undef CONFIG_PRIVIFY
295 #endif /* _IA64_CONFIG_H_ */