ia64/xen-unstable

view xen/include/asm-x86/types.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 5a7eebbae5dc
children b6aa55ca599e
line source
1 #ifndef __X86_TYPES_H__
2 #define __X86_TYPES_H__
4 #ifndef __ASSEMBLY__
6 #include <xen/config.h>
8 typedef __signed__ char __s8;
9 typedef unsigned char __u8;
11 typedef __signed__ short __s16;
12 typedef unsigned short __u16;
14 typedef __signed__ int __s32;
15 typedef unsigned int __u32;
17 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
18 #if defined(__i386__)
19 typedef __signed__ long long __s64;
20 typedef unsigned long long __u64;
21 #elif defined(__x86_64__)
22 typedef __signed__ long __s64;
23 typedef unsigned long __u64;
24 #endif
25 #endif
27 typedef signed char s8;
28 typedef unsigned char u8;
30 typedef signed short s16;
31 typedef unsigned short u16;
33 typedef signed int s32;
34 typedef unsigned int u32;
36 #if defined(__i386__)
37 typedef signed long long s64;
38 typedef unsigned long long u64;
39 #if defined(CONFIG_X86_PAE)
40 typedef u64 paddr_t;
41 #define PRIpaddr "016llx"
42 #else
43 typedef unsigned long paddr_t;
44 #define PRIpaddr "08lx"
45 #endif
46 #elif defined(__x86_64__)
47 typedef signed long s64;
48 typedef unsigned long u64;
49 typedef unsigned long paddr_t;
50 #define PRIpaddr "016lx"
51 #endif
53 typedef unsigned long size_t;
55 typedef char bool_t;
56 #define test_and_set_bool(b) xchg(&(b), 1)
57 #define test_and_clear_bool(b) xchg(&(b), 0)
59 #endif /* __ASSEMBLY__ */
61 #if defined(__i386__)
62 #define BITS_PER_LONG 32
63 #define BYTES_PER_LONG 4
64 #define LONG_BYTEORDER 2
65 #elif defined(__x86_64__)
66 #define BITS_PER_LONG 64
67 #define BYTES_PER_LONG 8
68 #define LONG_BYTEORDER 3
69 #endif
71 #endif /* __X86_TYPES_H__ */