From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SocoY-0002bx-R5 for qemu-devel@nongnu.org; Tue, 10 Jul 2012 11:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SocoS-0006lP-SN for qemu-devel@nongnu.org; Tue, 10 Jul 2012 11:57:26 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:53343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SocoS-0006kl-M1 for qemu-devel@nongnu.org; Tue, 10 Jul 2012 11:57:20 -0400 From: Meador Inge Date: Tue, 10 Jul 2012 10:57:11 -0500 Message-ID: <1341935833-2655-1-git-send-email-meadori@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 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 Hi, This patch series fixes an issue that was discussed here [1] where -R can fail when the mapped address space fails validation. I fixed this issue by (1) refactoring the guest space probing code into a single function for initialing the guest space and (2) by calling the guest space initializing code for both the case of reserving the guest memory 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. [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 | 162 ++++++++++++++++++++++++++++++++++++++------------ linux-user/main.c | 35 ++--------- linux-user/qemu.h | 13 +++- 3 files changed, 139 insertions(+), 71 deletions(-) -- 1.7.7.6