diff options
author | Paul Brook <paul@codesourcery.com> | 2009-07-17 12:48:08 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-07-17 13:12:41 +0100 |
commit | 379f6698d73f476de38682b3ff96ecb226728c43 (patch) | |
tree | 35ec0c77416322f16fa27d646af50c60363168e3 /cpu-all.h | |
parent | a9ff9df188615d653a5a904bafbe724d40143e35 (diff) | |
download | qemu-379f6698d73f476de38682b3ff96ecb226728c43.zip qemu-379f6698d73f476de38682b3ff96ecb226728c43.tar.gz qemu-379f6698d73f476de38682b3ff96ecb226728c43.tar.bz2 |
Userspace guest address offsetting
Re-implement GUEST_BASE support.
Offset guest ddress space by default if the guest binary contains
regions below the host mmap_min_addr.
Implement support for i386, x86-64 and arm hosts.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'cpu-all.h')
-rw-r--r-- | cpu-all.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -624,8 +624,13 @@ static inline void stfq_be_p(void *ptr, float64 v) /* On some host systems the guest address space is reserved on the host. * This allows the guest address space to be offset to a convenient location. */ -//#define GUEST_BASE 0x20000000 -#define GUEST_BASE 0 +#if defined(CONFIG_USE_GUEST_BASE) +extern unsigned long guest_base; +extern int have_guest_base; +#define GUEST_BASE guest_base +#else +#define GUEST_BASE 0ul +#endif /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ #define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE)) |