debuggers.hg

view xen/include/asm-x86/genapic.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 609da2035aab
children
line source
1 #ifndef _ASM_GENAPIC_H
2 #define _ASM_GENAPIC_H 1
4 /*
5 * Generic APIC driver interface.
6 *
7 * An straight forward mapping of the APIC related parts of the
8 * x86 subarchitecture interface to a dynamic object.
9 *
10 * This is used by the "generic" x86 subarchitecture.
11 *
12 * Copyright 2003 Andi Kleen, SuSE Labs.
13 */
15 struct mpc_config_translation;
16 struct mpc_config_bus;
17 struct mp_config_table;
18 struct mpc_config_processor;
20 struct genapic {
21 const char *name;
22 int (*probe)(void);
24 /* When one of the next two hooks returns 1 the genapic
25 is switched to this. Essentially they are additional probe
26 functions. */
27 int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
28 char *productid);
29 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
31 /* Interrupt delivery parameters ('physical' vs. 'logical flat'). */
32 int int_delivery_mode;
33 int int_dest_mode;
34 void (*init_apic_ldr)(void);
35 void (*clustered_apic_check)(void);
36 const cpumask_t *(*target_cpus)(void);
37 const cpumask_t *(*vector_allocation_cpumask)(int cpu);
38 unsigned int (*cpu_mask_to_apicid)(const cpumask_t *cpumask);
39 void (*send_IPI_mask)(const cpumask_t *mask, int vector);
40 void (*send_IPI_self)(int vector);
41 };
43 #define APICFUNC(x) .x = x
45 #define APIC_INIT(aname, aprobe) \
46 .name = aname, \
47 .probe = aprobe, \
48 APICFUNC(mps_oem_check), \
49 APICFUNC(acpi_madt_oem_check)
51 extern const struct genapic *genapic;
53 const cpumask_t *target_cpus_all(void);
55 void init_apic_ldr_flat(void);
56 void clustered_apic_check_flat(void);
57 unsigned int cpu_mask_to_apicid_flat(const cpumask_t *cpumask);
58 void send_IPI_mask_flat(const cpumask_t *mask, int vector);
59 void send_IPI_self_flat(int vector);
60 const cpumask_t *vector_allocation_cpumask_flat(int cpu);
61 #define GENAPIC_FLAT \
62 .int_delivery_mode = dest_LowestPrio, \
63 .int_dest_mode = 1 /* logical delivery */, \
64 .init_apic_ldr = init_apic_ldr_flat, \
65 .clustered_apic_check = clustered_apic_check_flat, \
66 .target_cpus = target_cpus_all, \
67 .vector_allocation_cpumask = vector_allocation_cpumask_flat, \
68 .cpu_mask_to_apicid = cpu_mask_to_apicid_flat, \
69 .send_IPI_mask = send_IPI_mask_flat, \
70 .send_IPI_self = send_IPI_self_flat
72 void init_apic_ldr_phys(void);
73 void clustered_apic_check_phys(void);
74 unsigned int cpu_mask_to_apicid_phys(const cpumask_t *cpumask);
75 void send_IPI_mask_phys(const cpumask_t *mask, int vector);
76 void send_IPI_self_phys(int vector);
77 const cpumask_t *vector_allocation_cpumask_phys(int cpu);
78 #define GENAPIC_PHYS \
79 .int_delivery_mode = dest_Fixed, \
80 .int_dest_mode = 0 /* physical delivery */, \
81 .init_apic_ldr = init_apic_ldr_phys, \
82 .clustered_apic_check = clustered_apic_check_phys, \
83 .target_cpus = target_cpus_all, \
84 .vector_allocation_cpumask = vector_allocation_cpumask_phys, \
85 .cpu_mask_to_apicid = cpu_mask_to_apicid_phys, \
86 .send_IPI_mask = send_IPI_mask_phys, \
87 .send_IPI_self = send_IPI_self_phys
89 void send_IPI_self_x2apic(int vector);
91 #endif