source: trunk/packages/xen-3.1/xen-3.1/xen/arch/x86/mm/shadow/multi.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 4.7 KB
Line 
1/******************************************************************************
2 * arch/x86/mm/shadow/multi.h
3 *
4 * Shadow declarations which will be multiply compiled.
5 * Parts of this code are Copyright (c) 2006 by XenSource Inc.
6 * Parts of this code are Copyright (c) 2006 by Michael A Fetterman
7 * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22 */
23
24extern int 
25SHADOW_INTERNAL_NAME(sh_map_and_validate_gl1e, SHADOW_LEVELS, GUEST_LEVELS)(
26    struct vcpu *v, mfn_t gl1mfn, void *new_gl1p, u32 size);
27extern int 
28SHADOW_INTERNAL_NAME(sh_map_and_validate_gl2e, SHADOW_LEVELS, GUEST_LEVELS)(
29    struct vcpu *v, mfn_t gl2mfn, void *new_gl2p, u32 size);
30extern int 
31SHADOW_INTERNAL_NAME(sh_map_and_validate_gl2he, SHADOW_LEVELS, GUEST_LEVELS)(
32    struct vcpu *v, mfn_t gl2mfn, void *new_gl2p, u32 size);
33extern int 
34SHADOW_INTERNAL_NAME(sh_map_and_validate_gl3e, SHADOW_LEVELS, GUEST_LEVELS)(
35    struct vcpu *v, mfn_t gl3mfn, void *new_gl3p, u32 size);
36extern int 
37SHADOW_INTERNAL_NAME(sh_map_and_validate_gl4e, SHADOW_LEVELS, GUEST_LEVELS)(
38    struct vcpu *v, mfn_t gl4mfn, void *new_gl4p, u32 size);
39
40extern void 
41SHADOW_INTERNAL_NAME(sh_destroy_l1_shadow, SHADOW_LEVELS, GUEST_LEVELS)(
42    struct vcpu *v, mfn_t smfn);
43extern void 
44SHADOW_INTERNAL_NAME(sh_destroy_l2_shadow, SHADOW_LEVELS, GUEST_LEVELS)(
45    struct vcpu *v, mfn_t smfn);
46extern void 
47SHADOW_INTERNAL_NAME(sh_destroy_l3_shadow, SHADOW_LEVELS, GUEST_LEVELS)(
48    struct vcpu *v, mfn_t smfn);
49extern void 
50SHADOW_INTERNAL_NAME(sh_destroy_l4_shadow, SHADOW_LEVELS, GUEST_LEVELS)(
51    struct vcpu *v, mfn_t smfn);
52
53extern void 
54SHADOW_INTERNAL_NAME(sh_unhook_32b_mappings, SHADOW_LEVELS, GUEST_LEVELS)
55    (struct vcpu *v, mfn_t sl2mfn);
56extern void 
57SHADOW_INTERNAL_NAME(sh_unhook_pae_mappings, SHADOW_LEVELS, GUEST_LEVELS)
58    (struct vcpu *v, mfn_t sl3mfn);
59extern void 
60SHADOW_INTERNAL_NAME(sh_unhook_64b_mappings, SHADOW_LEVELS, GUEST_LEVELS)
61    (struct vcpu *v, mfn_t sl4mfn);
62
63extern int
64SHADOW_INTERNAL_NAME(sh_rm_write_access_from_l1, SHADOW_LEVELS, GUEST_LEVELS)
65    (struct vcpu *v, mfn_t sl1mfn, mfn_t readonly_mfn);
66extern int
67SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, SHADOW_LEVELS, GUEST_LEVELS)
68    (struct vcpu *v, mfn_t sl1mfn, mfn_t target_mfn);
69
70extern void
71SHADOW_INTERNAL_NAME(sh_clear_shadow_entry, SHADOW_LEVELS, GUEST_LEVELS)
72    (struct vcpu *v, void *ep, mfn_t smfn);
73
74extern int
75SHADOW_INTERNAL_NAME(sh_remove_l1_shadow, SHADOW_LEVELS, GUEST_LEVELS)
76    (struct vcpu *v, mfn_t sl2mfn, mfn_t sl1mfn);
77extern int
78SHADOW_INTERNAL_NAME(sh_remove_l2_shadow, SHADOW_LEVELS, GUEST_LEVELS)
79    (struct vcpu *v, mfn_t sl3mfn, mfn_t sl2mfn);
80extern int
81SHADOW_INTERNAL_NAME(sh_remove_l3_shadow, SHADOW_LEVELS, GUEST_LEVELS)
82    (struct vcpu *v, mfn_t sl4mfn, mfn_t sl3mfn);
83
84#if SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES
85int 
86SHADOW_INTERNAL_NAME(sh_audit_l1_table, SHADOW_LEVELS, GUEST_LEVELS)
87    (struct vcpu *v, mfn_t sl1mfn, mfn_t x);
88int 
89SHADOW_INTERNAL_NAME(sh_audit_fl1_table, SHADOW_LEVELS, GUEST_LEVELS)
90    (struct vcpu *v, mfn_t sl1mfn, mfn_t x);
91int 
92SHADOW_INTERNAL_NAME(sh_audit_l2_table, SHADOW_LEVELS, GUEST_LEVELS)
93    (struct vcpu *v, mfn_t sl2mfn, mfn_t x);
94int 
95SHADOW_INTERNAL_NAME(sh_audit_l3_table, SHADOW_LEVELS, GUEST_LEVELS)
96    (struct vcpu *v, mfn_t sl3mfn, mfn_t x);
97int 
98SHADOW_INTERNAL_NAME(sh_audit_l4_table, SHADOW_LEVELS, GUEST_LEVELS)
99    (struct vcpu *v, mfn_t sl4mfn, mfn_t x);
100#endif
101
102extern void *
103SHADOW_INTERNAL_NAME(sh_guest_map_l1e, CONFIG_PAGING_LEVELS, CONFIG_PAGING_LEVELS)
104    (struct vcpu *v, unsigned long va, unsigned long *gl1mfn);
105extern void
106SHADOW_INTERNAL_NAME(sh_guest_get_eff_l1e, CONFIG_PAGING_LEVELS, CONFIG_PAGING_LEVELS)
107    (struct vcpu *v, unsigned long va, void *eff_l1e);
108
109#if SHADOW_LEVELS == GUEST_LEVELS
110extern mfn_t
111SHADOW_INTERNAL_NAME(sh_make_monitor_table, SHADOW_LEVELS, GUEST_LEVELS)
112    (struct vcpu *v);
113extern void
114SHADOW_INTERNAL_NAME(sh_destroy_monitor_table, SHADOW_LEVELS, GUEST_LEVELS)
115    (struct vcpu *v, mfn_t mmfn);
116#endif
117
118extern struct paging_mode
119SHADOW_INTERNAL_NAME(sh_paging_mode, SHADOW_LEVELS, GUEST_LEVELS);
Note: See TracBrowser for help on using the repository browser.