debuggers.hg

view tools/libxc/ia64/xc_ia64_save_restore.h @ 17969:1201c7657832

[IA64] ia64 save/restore new formart. save part.

Introduce ia64 save/restore new formart. save part.
The formart twist is necessary for pv_ops linux support saving/restoring
all of the online vcpu context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Tue Jun 10 16:00:33 2008 +0900 (2008-06-10)
parents fc89fb719214
children eccfdeb41b80
line source
1 /******************************************************************************
2 * xc_ia64_save_restore.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 XC_IA64_SAVE_RESTORE_H
24 #define XC_IA64_SR_H
26 /* introduced changeset 10692:306d7857928c of xen-ia64-unstable.ht */
27 #define XC_IA64_SR_FORMAT_VER_ONE 1UL
28 /* using foreign p2m exposure version */
29 #define XC_IA64_SR_FORMAT_VER_TWO 2UL
30 /* only pv change: send vcpumap and all vcpu context */
31 #define XC_IA64_SR_FORMAT_VER_THREE 3UL
32 #define XC_IA64_SR_FORMAT_VER_MAX 3UL
34 #define XC_IA64_SR_FORMAT_VER_CURRENT XC_IA64_SR_FORMAT_VER_THREE
36 /*
37 ** During (live) save/migrate, we maintain a number of bitmaps to track
38 ** which pages we have to send, and to skip.
39 */
40 #define BITS_PER_LONG (sizeof(unsigned long) * 8)
42 #define BITMAP_ENTRY(_nr,_bmap) \
43 ((unsigned long *)(_bmap))[(_nr)/BITS_PER_LONG]
45 #define BITMAP_SHIFT(_nr) ((_nr) % BITS_PER_LONG)
47 static inline int __test_bit(int nr, void * addr)
48 {
49 return (BITMAP_ENTRY(nr, addr) >> BITMAP_SHIFT(nr)) & 1;
50 }
52 static inline void __set_bit(int nr, void * addr)
53 {
54 BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
55 }
57 #endif /* XC_IA64_SAVE_RESTORE_H */
59 /*
60 * Local variables:
61 * mode: C
62 * c-set-style: "BSD"
63 * c-basic-offset: 4
64 * tab-width: 4
65 * indent-tabs-mode: nil
66 * End:
67 */