From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyMSV-0003Gd-Hf for qemu-devel@nongnu.org; Tue, 20 Mar 2018 14:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyMSU-0004PB-Sw for qemu-devel@nongnu.org; Tue, 20 Mar 2018 14:58:07 -0400 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:38659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eyMSU-0004P4-NY for qemu-devel@nongnu.org; Tue, 20 Mar 2018 14:58:06 -0400 Received: by mail-oi0-x242.google.com with SMTP id c3-v6so2267879oib.5 for ; Tue, 20 Mar 2018 11:58:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87tvtawpk2.wl-lukeshu@lukeshu.com> References: <20171228180814.9749-1-lukeshu@lukeshu.com> <20171228180814.9749-11-lukeshu@lukeshu.com> <87tvtawpk2.wl-lukeshu@lukeshu.com> From: Peter Maydell Date: Tue, 20 Mar 2018 18:57:45 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH 10/10] linux-user: init_guest_space: Try to make ARM space+commpage continuous List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luke Shumaker Cc: Luke Shumaker , Riku Voipio , Laurent Vivier , QEMU Developers , Paul Brook On 20 March 2018 at 18:49, Luke Shumaker wrote: > On Fri, 02 Mar 2018 09:13:12 -0500, > Peter Maydell wrote: >> On 28 December 2017 at 18:08, Luke Shumaker wrote: >> > + guest_full_size = >> > + (0xffff0f00 & qemu_host_page_mask) + qemu_host_page_size; > ^ >> I think this is probably more clearly written as 0x100000000ULL, >> since rounding down to the host-page-size then adding the host-page-size >> gets us the full 32-bit size of the guest address space. > > Wait, is that right? Isn't that only true if qemu_host_page_size is > at least 8KiB (16 bits), enough to fill the zero in the middle? Won't > a typical qemu_host_page_size be only 4KiB? Yeah, I just got the arithmetic wrong here because I had it stuck in my head that the commpage was the top page of the guest address space. -- PMM