qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 1/1] linux-user: Probe the guest base for sh


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH 1/1] linux-user: Probe the guest base for shared objects when needed
Date: Wed, 27 Jun 2012 18:44:09 +0100

On 27 June 2012 18:32, Richard Henderson <address@hidden> wrote:
> I do wonder if it wouldn't be better to rearrange things such that
> for 64-bit hosts and 32-bit guests we *always* reserve 4G so that
> there's zero possibility of the guest stomping on host memory.  That
> would also solve your problem.

We already almost do that;

#if (TARGET_LONG_BITS == 32) && (HOST_LONG_BITS == 64)
/*
 * When running 32-on-64 we should make sure we can fit all of the possible
 * guest address space into a contiguous chunk of virtual host memory.
 *
 * This way we will never overlap with our own libraries or binaries or stack
 * or anything else that QEMU maps.
 */
unsigned long reserved_va = 0xf7000000;
#else
unsigned long reserved_va;
#endif
#endif

The only reason this isn't asking for the full 4GB is that pesky
ARM commpage, and (as you hint) the right way to fix this is to
make the commpage cope OK with being inside the reserved region
as well as outside it, and then we could make that reserved_va
value actually be 4GB.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]