ia64/xen-unstable

view xen/include/asm-ia64/shadow.h @ 10786:86e5d8458c08

[IA64] live migration

Shadow mode and live migration.

Virtualize Dirty bit.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Wed Jul 26 09:36:36 2006 -0600 (2006-07-26)
parents 7ae164a41569
children c3e20511c745
line source
1 /******************************************************************************
2 * include/asm-ia64/shadow.h
3 *
4 * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
23 #ifndef _XEN_SHADOW_H
24 #define _XEN_SHADOW_H
26 #include <xen/config.h>
28 #ifdef CONFIG_XEN_IA64_DOM0_VP
29 #ifndef CONFIG_SHADOW
30 # error "CONFIG_SHADOW must be defined"
31 #endif
33 #define shadow_drop_references(d, p) ((void)0)
35 // this is used only x86-specific code
36 //#define shadow_sync_and_drop_references(d, p) ((void)0)
38 #define shadow_mode_translate(d) (1)
40 /*
41 * Utilities to change relationship of gpfn->mfn for designated domain,
42 * which is required by gnttab transfer, balloon, device model and etc.
43 */
44 void guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
45 void guest_physmap_remove_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
46 #endif
48 static inline int
49 shadow_mode_enabled(struct domain *d)
50 {
51 return d->arch.shadow_bitmap != NULL;
52 }
54 static inline int
55 shadow_mark_page_dirty(struct domain *d, unsigned long gpfn)
56 {
57 if (gpfn < d->arch.shadow_bitmap_size * 8
58 && !test_and_set_bit(gpfn, d->arch.shadow_bitmap)) {
59 /* The page was not dirty. */
60 atomic64_inc(&d->arch.shadow_dirty_count);
61 return 1;
62 } else
63 return 0;
64 }
66 #endif // _XEN_SHADOW_H
68 /*
69 * Local variables:
70 * mode: C
71 * c-set-style: "BSD"
72 * c-basic-offset: 4
73 * tab-width: 4
74 * indent-tabs-mode: nil
75 * End:
76 */