From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40093 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OK2So-0002OO-O4 for qemu-devel@nongnu.org; Thu, 03 Jun 2010 00:55:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OK2Sh-0001k0-LZ for qemu-devel@nongnu.org; Thu, 03 Jun 2010 00:55:24 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:38127) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK2Sh-0001ju-Av for qemu-devel@nongnu.org; Thu, 03 Jun 2010 00:55:23 -0400 From: Paul Brook Date: Thu, 3 Jun 2010 05:54:38 +0100 References: <4C0692F2.9060203@twiddle.net> In-Reply-To: <4C0692F2.9060203@twiddle.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006030554.38803.paul@codesourcery.com> Subject: [Qemu-devel] Re: Unposted reserved_va patch List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org > Re: 68a1c816868b3e35a1da698af412b29e61b1948a > > In general, I like the idea (especially since I've proposed it before. ;-) > > However: > > + if (have_guest_base) { > + flags |= MAP_FIXED; > + } > > I think this is broken. If the user specifies -G n -R m they're hoping > or guessing that the range [n,n+m) is free. What they're not expecting > is for the qemu application or any of the required shared libraries to > get forcibly unmapped. > > I think instead you should simply adjust the error reporting after the > mmap attempt without MAP_FIXED. Hmm, maybe. My reasoning was that this is consistent with the current behavior of the ELF loader. If you specify -G then the target application will be splatted at that address, regardless of whether it's already used by the host. Paul