ia64/xen-unstable

view xen/include/asm-x86/mach-summit/mach_mpparse.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 887ff2d1e382
children
line source
1 #ifndef __ASM_MACH_MPPARSE_H
2 #define __ASM_MACH_MPPARSE_H
4 extern int use_cyclone;
6 #ifdef CONFIG_X86_SUMMIT_NUMA
7 extern void setup_summit(void);
8 #else
9 #define setup_summit() {}
10 #endif
12 extern int usb_early_handoff;
13 static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
14 char *productid)
15 {
16 if (!strncmp(oem, "IBM ENSW", 8) &&
17 (!strncmp(productid, "VIGIL SMP", 9)
18 || !strncmp(productid, "EXA", 3)
19 || !strncmp(productid, "RUTHLESS SMP", 12))){
20 use_cyclone = 1; /*enable cyclone-timer*/
21 setup_summit();
22 /*usb_early_handoff = 1;*/
23 return 1;
24 }
25 return 0;
26 }
28 /* Hook from generic ACPI tables.c */
29 static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
30 {
31 if (!strncmp(oem_id, "IBM", 3) &&
32 (!strncmp(oem_table_id, "SERVIGIL", 8)
33 || !strncmp(oem_table_id, "EXA", 3))){
34 use_cyclone = 1; /*enable cyclone-timer*/
35 setup_summit();
36 /*usb_early_handoff = 1;*/
37 return 1;
38 }
39 return 0;
40 }
42 struct rio_table_hdr {
43 unsigned char version; /* Version number of this data structure */
44 /* Version 3 adds chassis_num & WP_index */
45 unsigned char num_scal_dev; /* # of Scalability devices (Twisters for Vigil) */
46 unsigned char num_rio_dev; /* # of RIO I/O devices (Cyclones and Winnipegs) */
47 } __attribute__((packed));
49 struct scal_detail {
50 unsigned char node_id; /* Scalability Node ID */
51 unsigned long CBAR; /* Address of 1MB register space */
52 unsigned char port0node; /* Node ID port connected to: 0xFF=None */
53 unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
54 unsigned char port1node; /* Node ID port connected to: 0xFF = None */
55 unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
56 unsigned char port2node; /* Node ID port connected to: 0xFF = None */
57 unsigned char port2port; /* Port num port connected to: 0,1,2, or 0xFF=None */
58 unsigned char chassis_num; /* 1 based Chassis number (1 = boot node) */
59 } __attribute__((packed));
61 struct rio_detail {
62 unsigned char node_id; /* RIO Node ID */
63 unsigned long BBAR; /* Address of 1MB register space */
64 unsigned char type; /* Type of device */
65 unsigned char owner_id; /* For WPEG: Node ID of Cyclone that owns this WPEG*/
66 /* For CYC: Node ID of Twister that owns this CYC */
67 unsigned char port0node; /* Node ID port connected to: 0xFF=None */
68 unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
69 unsigned char port1node; /* Node ID port connected to: 0xFF=None */
70 unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
71 unsigned char first_slot; /* For WPEG: Lowest slot number below this WPEG */
72 /* For CYC: 0 */
73 unsigned char status; /* For WPEG: Bit 0 = 1 : the XAPIC is used */
74 /* = 0 : the XAPIC is not used, ie:*/
75 /* ints fwded to another XAPIC */
76 /* Bits1:7 Reserved */
77 /* For CYC: Bits0:7 Reserved */
78 unsigned char WP_index; /* For WPEG: WPEG instance index - lower ones have */
79 /* lower slot numbers/PCI bus numbers */
80 /* For CYC: No meaning */
81 unsigned char chassis_num; /* 1 based Chassis number */
82 /* For LookOut WPEGs this field indicates the */
83 /* Expansion Chassis #, enumerated from Boot */
84 /* Node WPEG external port, then Boot Node CYC */
85 /* external port, then Next Vigil chassis WPEG */
86 /* external port, etc. */
87 /* Shared Lookouts have only 1 chassis number (the */
88 /* first one assigned) */
89 } __attribute__((packed));
92 typedef enum {
93 CompatTwister = 0, /* Compatibility Twister */
94 AltTwister = 1, /* Alternate Twister of internal 8-way */
95 CompatCyclone = 2, /* Compatibility Cyclone */
96 AltCyclone = 3, /* Alternate Cyclone of internal 8-way */
97 CompatWPEG = 4, /* Compatibility WPEG */
98 AltWPEG = 5, /* Second Planar WPEG */
99 LookOutAWPEG = 6, /* LookOut WPEG */
100 LookOutBWPEG = 7, /* LookOut WPEG */
101 } node_type;
103 static inline int is_WPEG(struct rio_detail *rio){
104 return (rio->type == CompatWPEG || rio->type == AltWPEG ||
105 rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
106 }
108 #endif /* __ASM_MACH_MPPARSE_H */