From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3q0Q-00050g-Qb for qemu-devel@nongnu.org; Tue, 01 Dec 2015 13:50:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3q0M-0003i9-OP for qemu-devel@nongnu.org; Tue, 01 Dec 2015 13:50:26 -0500 Received: from smtp.citrix.com ([66.165.176.89]:2311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3q0M-0003i3-K6 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 13:50:22 -0500 Date: Tue, 1 Dec 2015 18:50:18 +0000 From: Anthony PERARD Message-ID: <20151201185018.GD1788@perard.uk.xensource.com> References: <20151201175357.GC1788@perard.uk.xensource.com> <20151201183735.GC2580@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20151201183735.GC2580@work-vm> Subject: Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: Paolo Bonzini , Stefano Stabellini , Xen Devel , QEMU-devel , Juan Quintela On Tue, Dec 01, 2015 at 06:37:36PM +0000, Dr. David Alan Gilbert wrote: > * Anthony PERARD (anthony.perard@citrix.com) wrote: > > Hi, > > > > Under Xen, a guest with 5G of RAM, with a 32bit binary QEMU (well, with a > > 32bit dom0) does not boot anymore. QEMU abort() with "Bad ram offset efffd000". > > > > This issue first appear in 4ed023ce2a39ab5812d33cf4d819def168965a7f (Round > > up RAMBlock sizes to host page sizes). > > > > The problem is in qemu_ram_alloc_internal() where 'size' and 'maxsize' are > > now been truncate to 32bit, due to 'qemu_host_page_size' been an uintptr_t > > in the HOST_PAGE_ALIGN macro. > > > > ram_add_t is uint64_t when compiled with --enable-xen. > > Hmm, that's a fun problem. > Would changing qemu_host_page_[size|mask] to ram_addr_t work? Yes, well, I did change the type to uint64_t and I could boot a guest. With ram_addr_t, it works fine as well. -- Anthony PERARD