From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsfOX-0002GG-71 for qemu-devel@nongnu.org; Wed, 22 Oct 2008 11:13:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsfOV-0002G4-Qx for qemu-devel@nongnu.org; Wed, 22 Oct 2008 11:13:08 -0400 Received: from [199.232.76.173] (port=51831 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsfOV-0002G1-Fm for qemu-devel@nongnu.org; Wed, 22 Oct 2008 11:13:07 -0400 Received: from an-out-0708.google.com ([209.85.132.241]:63029) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KsfOU-0001xd-Ql for qemu-devel@nongnu.org; Wed, 22 Oct 2008 11:13:07 -0400 Received: by an-out-0708.google.com with SMTP id d18so173862and.130 for ; Wed, 22 Oct 2008 08:13:01 -0700 (PDT) Message-ID: <48FF42F9.1050901@codemonkey.ws> Date: Wed, 22 Oct 2008 10:12:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Allocate translation buffer before guest RAM, in case guest RAM is too large on 64 bit hosts References: <20081018210508.GA51078@saturn.kn-bremen.de> <200810212159.m9LLxGGB011986@saturn.kn-bremen.de> In-Reply-To: <200810212159.m9LLxGGB011986@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juergen Lock Cc: qemu-devel@nongnu.org Juergen Lock wrote: > In article <48FDE6BA.4070102@codemonkey.ws> you write: > >> Juergen Lock wrote: >> >>> Hi! >>> >>> The following patch appears to fix -m >= 1024 on recent FreeBSD/amd64 hosts >>> (RELENG_7/HEAD) that no longer return high addresses for allocations by >>> default (which was the original reason for r5331.) As this makes sense >>> in any case when you pass something like -m 4096 on hosts that allocate >>> from low addresses by default (there would be no room left for the >>> translation buffer in the low vm where it needs to be), I patched it like >>> this instead of conditionalizing the mmap hack from r5331 on the FreeBSD >>> version. >>> >>> >> I fear there is too much magic here. >> > > Heh. > > >> Does FreeBSD not have a flag to >> mmap from high memory? >> > > I don't think so. > > >> What is the the original problem? >> >> > code_gen_buffer needs to be in the lower 4G (because of branches with > 32 bit offsets etc.) > Can you resubmit the patch with a big comment explaining why the allocation order is important? Regards, Anthony Liguori >> Regards, >> >> Anthony Liguori >> > > Thanx, > Juergen >