From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bGD-0000Yu-FN for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:11:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5bG6-0002fr-Sv for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:11:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bG6-0002fW-Kz for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:11:46 -0500 Message-ID: <4F5893EE.1060106@redhat.com> Date: Thu, 08 Mar 2012 13:11:42 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1329211670-11548-1-git-send-email-avi@redhat.com> <1329211670-11548-9-git-send-email-avi@redhat.com> <4F5880F9.2080905@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/20] memory: store MemoryRegionSection pointers in phys_map List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On 03/08/2012 12:09 PM, Peter Maydell wrote: > On 8 March 2012 09:50, Avi Kivity wrote: > > On 03/07/2012 09:32 PM, Peter Maydell wrote: > >> Are we running into the "mapping devices at non-page-offsets isn't > >> supported" issue here? > > > > It wasn't supported? > > Well, you used to run into the issue noted in the comment above > exec.c:register_subpage(): > The address used when calling the IO function is > the offset from the start of the region, plus region_offset. Both > start_addr and region_offset are rounded down to a page boundary > before calculating this offset. This should not be a problem unless > the low bits of start_addr and region_offset differ. > > and for non-page-aligned IO regions we were getting bitten by > this rounding, which is why the offset passed into the read/write > function was strange. > > Is that exec.c comment now out of date? For subpage, I think so. It's still broken for page aligned regions that have low bits set in their offset: memory_region_init_io(foo, ..., 4097) memory_region_add_subregion(sysmem, 4095, foo); the 4095-4096 region will work, but the 4096-8191 region will not. I'll address it later when I'll regress the memory core in other ways. > (You might recall we had a conversation about this a little while > back: http://patchwork.ozlabs.org/patch/129267/ ) I had a full memory wipe done during my vacation, so no. -- error compiling committee.c: too many arguments to function