From 379f6698d73f476de38682b3ff96ecb226728c43 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Fri, 17 Jul 2009 12:48:08 +0100 Subject: 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 Signed-off-by: Paul Brook --- cpu-all.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpu-all.h') diff --git a/cpu-all.h b/cpu-all.h index 1166786..96b25fc 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -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)) -- cgit v1.1