debuggers.hg

view xen/include/asm-x86/smp.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 578ed14c3c67
children
line source
1 #ifndef __ASM_SMP_H
2 #define __ASM_SMP_H
4 /*
5 * We need the APIC definitions automatically as part of 'smp.h'
6 */
7 #ifndef __ASSEMBLY__
8 #include <xen/config.h>
9 #include <xen/kernel.h>
10 #include <xen/cpumask.h>
11 #include <asm/current.h>
12 #endif
14 #ifndef __ASSEMBLY__
15 #include <asm/bitops.h>
16 #include <asm/mpspec.h>
17 #endif
19 #define BAD_APICID -1U
20 #ifdef CONFIG_SMP
21 #ifndef __ASSEMBLY__
23 /*
24 * Private routines/data
25 */
27 extern void smp_alloc_memory(void);
28 DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
29 DECLARE_PER_CPU(cpumask_t, cpu_core_map);
31 void smp_send_nmi_allbutself(void);
33 void send_IPI_mask(const cpumask_t *mask, int vector);
35 extern void (*mtrr_hook) (void);
37 #ifdef CONFIG_X86_64
38 extern void zap_low_mappings(void);
39 #else
40 extern void zap_low_mappings(l2_pgentry_t *base);
41 #endif
43 #define MAX_APICID 256
44 extern u32 x86_cpu_to_apicid[];
45 extern u32 cpu_2_logical_apicid[];
47 #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu]
49 #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
50 extern void cpu_exit_clear(unsigned int cpu);
51 extern void cpu_uninit(unsigned int cpu);
52 int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm);
54 /*
55 * This function is needed by all SMP systems. It must _always_ be valid
56 * from the initial startup. We map APIC_BASE very early in page_setup(),
57 * so this is correct in the x86 case.
58 */
59 #define raw_smp_processor_id() (get_processor_id())
61 int hard_smp_processor_id(void);
62 int logical_smp_processor_id(void);
64 void __stop_this_cpu(void);
66 #endif /* !__ASSEMBLY__ */
68 #else /* CONFIG_SMP */
70 #define cpu_physical_id(cpu) boot_cpu_physical_apicid
72 #define NO_PROC_ID 0xFF /* No processor magic marker */
74 #endif
75 #endif