debuggers.hg

view xen/include/asm-x86/percpu.h @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents d867eb643fe4
children
line source
1 #ifndef __X86_PERCPU_H__
2 #define __X86_PERCPU_H__
4 #ifndef __ASSEMBLY__
5 extern char __per_cpu_start[], __per_cpu_data_end[];
6 extern unsigned long __per_cpu_offset[NR_CPUS];
7 void percpu_init_areas(void);
8 #endif
10 /* Separate out the type, so (int[3], foo) works. */
11 #define __DEFINE_PER_CPU(type, name, suffix) \
12 __attribute__((__section__(".bss.percpu" #suffix))) \
13 __typeof__(type) per_cpu_##name
15 /* var is in discarded region: offset to particular copy we want */
16 #define per_cpu(var, cpu) \
17 (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
18 #define __get_cpu_var(var) \
19 (*RELOC_HIDE(&per_cpu__##var, get_cpu_info()->per_cpu_offset))
21 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
23 #endif /* __X86_PERCPU_H__ */