From f15fbc4bd1a24bd1477a846e63e62c6d435912f8 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Wed, 20 Jul 2011 08:17:42 +0000 Subject: 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 Signed-off-by: Alexander Graf --- cpu-common.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpu-common.h') diff --git a/cpu-common.h b/cpu-common.h index 44b04b3839..070010130c 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 */ -- cgit v1.2.3-55-g7522 From 332ae28dad2d4f155e1ad82bf89a605c2b2710ba Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 28 Jul 2011 12:10:28 +0200 Subject: move WORDS_ALIGNED to qemu-common.h This is not a CPU interface, and a configure test would not be too precise. So just add it to qemu-common.h. Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- cpu-common.h | 4 ---- qemu-common.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cpu-common.h') diff --git a/cpu-common.h b/cpu-common.h index 44b04b3839..16c9f4f487 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -3,10 +3,6 @@ /* CPU interfaces that are target indpendent. */ -#if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__) || defined(__ia64__) -#define WORDS_ALIGNED -#endif - #ifdef TARGET_PHYS_ADDR_BITS #include "targphys.h" #endif diff --git a/qemu-common.h b/qemu-common.h index 391fadda56..1e3c66511e 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -5,6 +5,10 @@ #include "compiler.h" #include "config-host.h" +#if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__) || defined(__ia64__) +#define WORDS_ALIGNED +#endif + #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) typedef struct QEMUTimer QEMUTimer; -- cgit v1.2.3-55-g7522