qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] linux-user: fix mips 32-on-64 prealloc case


From: Eric Johnson
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix mips 32-on-64 prealloc case
Date: Thu, 3 Jan 2013 10:39:10 -0800
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

On 01/03/2013 09:24 AM, Alexander Graf wrote:
On 03.01.2013, at 18:19, Peter Maydell wrote:

On 3 January 2013 13:17, Alexander Graf <address@hidden> wrote:
MIPS only supports 31 bits of virtual address space for user space, so let's
make sure we stay within that limit with our preallocated memory block.

This fixes the MIPS user space targets when executed without command line
option.
This looks weird -- why should the guest care that we've reserved a
4GB block which it only uses half of? Or is the problem that host
mmap() ends up handing out addresses from anywhere in the 4GB
reserved area?
Even worse, it starts from the top IIRC.

MIPS uses the upper virtual address bit for kernel/user space indication. I'm not sure where exactly this logic falls apart in our case, but user space virtual addresses above 2GB are simple illegal in that world, so I wouldn't expect QEMU or a guest process to cope with them.


Alex



While making this change please keep in mind that newer MIPS32 processors allow more than 31 bits of user address space (up to 3.5 GiB) if they have Enhanced Virtual Address support.  For example see the Software User's Manual for the interAptiv processors:

At the bottom of the page
http://www.mips.com/products/processor-cores/aptiv/interaptiv/
is the link
interAptiv™ Multiprocessing System Software User's Manual

Go to section
1.2.7.5 Enhanced Virtual Address

Eric

reply via email to

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