aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xg_private.h
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-15 14:28:01 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-15 14:28:01 +0000
commitcfafd88d920bc598c5e160fd90eeff5fc3bae323 (patch)
tree1468adfbac8653963520f68a00b385ecee680a03 /tools/libxc/xg_private.h
parent073f9d922a95fa28213539324b1ebbf1b56af330 (diff)
downloadxen-cfafd88d920bc598c5e160fd90eeff5fc3bae323.tar.gz
xen-cfafd88d920bc598c5e160fd90eeff5fc3bae323.tar.bz2
xen-cfafd88d920bc598c5e160fd90eeff5fc3bae323.zip
Lift physical address restriction in save/restore code.
Bump this to 44 bits for x86-32 and 52 bits for x86-64. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'tools/libxc/xg_private.h')
-rw-r--r--tools/libxc/xg_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h
index 62b26db0ff..3cf6fbf22a 100644
--- a/tools/libxc/xg_private.h
+++ b/tools/libxc/xg_private.h
@@ -134,6 +134,13 @@ typedef l4_pgentry_64_t l4_pgentry_t;
#define PAGE_SHIFT_X86 12
#define PAGE_SIZE_X86 (1UL << PAGE_SHIFT_X86)
#define PAGE_MASK_X86 (~(PAGE_SIZE_X86-1))
+#if defined(__i386__)
+#define MADDR_BITS_X86 44
+#elif defined(__x86_64__)
+#define MADDR_BITS_X86 52
+#endif
+#define MFN_MASK_X86 ((1ULL << (MADDR_BITS_X86 - PAGE_SHIFT_X86)) - 1)
+#define MADDR_MASK_X86 (MFN_MASK_X86 << PAGE_SHIFT_X86)
#define PAGE_SHIFT_IA64 14
#define PAGE_SIZE_IA64 (1UL << PAGE_SHIFT_IA64)