aboutsummaryrefslogtreecommitdiff
path: root/cpu-common.h
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-07-20 08:17:42 +0000
committerAlexander Graf <agraf@suse.de>2011-07-26 06:57:28 +0200
commitf15fbc4bd1a24bd1477a846e63e62c6d435912f8 (patch)
treed4672ffec3af926c85caf440282a095ea9c66623 /cpu-common.h
parent59d21e537b6c3a964d4e346e9cf2a1e17267a27c (diff)
downloadqemu-f15fbc4bd1a24bd1477a846e63e62c6d435912f8.zip
qemu-f15fbc4bd1a24bd1477a846e63e62c6d435912f8.tar.gz
qemu-f15fbc4bd1a24bd1477a846e63e62c6d435912f8.tar.bz2
cpu-common: Have a ram_addr_t of uint64 with Xen.
In Xen case, memory can be bigger than the host memory. that mean a 32bits host (and QEMU) should be able to handle a RAM address of 64bits. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cpu-common.h')
-rw-r--r--cpu-common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpu-common.h b/cpu-common.h
index 44b04b3..0700101 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -27,7 +27,15 @@ enum device_endian {
};
/* address in the RAM (different from a physical address) */
+#if defined(CONFIG_XEN_BACKEND) && TARGET_PHYS_ADDR_BITS == 64
+typedef uint64_t ram_addr_t;
+# define RAM_ADDR_MAX UINT64_MAX
+# define RAM_ADDR_FMT "%" PRIx64
+#else
typedef unsigned long ram_addr_t;
+# define RAM_ADDR_MAX ULONG_MAX
+# define RAM_ADDR_FMT "%lx"
+#endif
/* memory API */