ia64/xen-unstable

view xen/include/asm-x86/genapic.h @ 15812:86a154e1ef5d

[HVM] Shadow: don't shadow the p2m table.
For HVM vcpus with paging disabled, we used to shadow the p2m table,
and skip the p2m lookup to go from gfn to mfn. Instead, we now
provide a simple pagetable that gives a one-to-one mapping of 4GB, and
shadow that, making the translations from gfn to mfn via the p2m.
This removes the paging-disabled special-case code from the shadow
fault handler, and allows us to expand the p2m interface, since all HVM
translations now go through the same p2m lookups.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Fri Aug 31 11:06:22 2007 +0100 (2007-08-31)
parents 88e6bd5e2b54
children 9fd00ff95068
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 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 cpumask_t (*target_cpus)(void);
37 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
38 void (*send_IPI_mask)(cpumask_t mask, int vector);
39 };
41 #define APICFUNC(x) .x = x
43 #define APIC_INIT(aname, aprobe) \
44 .name = aname, \
45 .probe = aprobe, \
46 APICFUNC(mps_oem_check), \
47 APICFUNC(acpi_madt_oem_check)
49 extern struct genapic *genapic;
51 void init_apic_ldr_flat(void);
52 void clustered_apic_check_flat(void);
53 cpumask_t target_cpus_flat(void);
54 unsigned int cpu_mask_to_apicid_flat(cpumask_t cpumask);
55 void send_IPI_mask_flat(cpumask_t mask, int vector);
56 #define GENAPIC_FLAT \
57 .int_delivery_mode = dest_LowestPrio, \
58 .int_dest_mode = 1 /* logical delivery */, \
59 .init_apic_ldr = init_apic_ldr_flat, \
60 .clustered_apic_check = clustered_apic_check_flat, \
61 .target_cpus = target_cpus_flat, \
62 .cpu_mask_to_apicid = cpu_mask_to_apicid_flat, \
63 .send_IPI_mask = send_IPI_mask_flat
65 void init_apic_ldr_phys(void);
66 void clustered_apic_check_phys(void);
67 cpumask_t target_cpus_phys(void);
68 unsigned int cpu_mask_to_apicid_phys(cpumask_t cpumask);
69 void send_IPI_mask_phys(cpumask_t mask, int vector);
70 #define GENAPIC_PHYS \
71 .int_delivery_mode = dest_Fixed, \
72 .int_dest_mode = 0 /* physical delivery */, \
73 .init_apic_ldr = init_apic_ldr_phys, \
74 .clustered_apic_check = clustered_apic_check_phys, \
75 .target_cpus = target_cpus_phys, \
76 .cpu_mask_to_apicid = cpu_mask_to_apicid_phys, \
77 .send_IPI_mask = send_IPI_mask_phys
79 #endif