From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swdwy-0005Sb-S4 for qemu-devel@nongnu.org; Wed, 01 Aug 2012 14:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Swdwu-0002fH-IE for qemu-devel@nongnu.org; Wed, 01 Aug 2012 14:47:16 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:59285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swdwu-0002eZ-C4 for qemu-devel@nongnu.org; Wed, 01 Aug 2012 14:47:12 -0400 Message-ID: <501979AA.9030606@codesourcery.com> Date: Wed, 1 Aug 2012 13:47:06 -0500 From: Meador Inge MIME-Version: 1.0 References: <1343357402-20685-1-git-send-email-meadori@codesourcery.com> In-Reply-To: <1343357402-20685-1-git-send-email-meadori@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/2] Probe the guest memory space when using -R List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: riku.voipio@iki.fi, paul@codesourcery.com Ping. On 07/26/2012 09:50 PM, Meador Inge wrote: > Hi, > > This patch series fixes an issue that was discussed here [1] where using -R > can cause QEMU to fail to setup the guest address space because the guest base > validation fails. I fixed this issue by (1) refactoring the guest space > probing code into a single function for initializing the guest space and (2) by > calling the guest space initialization code for both the case of reserving the > guest space upfront (-R) and the case where the initial memory space base/size > are gleaned from an ELF image. > > Tested by going through various combinations of -R , -B , > -B -R , and neither -R or -B passed. I also ran the libstdc++ > testsuite through the MIPS, ARM, and Power usermode emulators with -R set. > No regressions. > > NOTE: This does not fix the problem that was raised concerning mapped the > full 32-bit address space on a 64-bit system. That will need to be another > patch. > > - Changes since v1: > > * Replaced '!host_start && !host_size' error check in 'init_guest_space' > with an assert. > > * Ensured that 'guest_validate_base' is passed the true guest base instead > of the current host start address. > > * s/init_guest_space(..., 0)/init_guest_space(..., false);/ > > * Fixed typo in 'init_guest_space' header comment. > > [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-06/msg04508.html > > Signed-off-by: Meador Inge > > Meador Inge (2): > linux-user: Factor out guest space probing into a function > linux-user: Use init_guest_space when -R and -B are specified > > linux-user/elfload.c | 161 ++++++++++++++++++++++++++++++++++++++------------ > linux-user/main.c | 35 ++--------- > linux-user/qemu.h | 15 ++++- > 3 files changed, 140 insertions(+), 71 deletions(-) > -- Meador Inge CodeSourcery / Mentor Embedded http://www.mentor.com/embedded-software