From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVOEQ-0004Qm-Av for qemu-devel@nongnu.org; Tue, 29 Nov 2011 09:00:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVOEK-0005Pi-NW for qemu-devel@nongnu.org; Tue, 29 Nov 2011 09:00:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVOEK-0005PV-GU for qemu-devel@nongnu.org; Tue, 29 Nov 2011 09:00:16 -0500 Message-ID: <4ED4E56C.9090507@redhat.com> Date: Tue, 29 Nov 2011 16:00:12 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1322492805-5530-1-git-send-email-afaerber@suse.de> <4ED4D446.3010508@suse.de> In-Reply-To: <4ED4D446.3010508@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] exec.c: Fix subpage memory access to RAM MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Blue Swirl , qemu-devel@nongnu.org, Gleb Natapov On 11/29/2011 02:47 PM, Andreas F=C3=A4rber wrote: > > =20 > > addr +=3D mmio->region_offset[idx]; > > idx =3D mmio->sub_io_index[idx]; > > + if (unlikely(idx =3D=3D IO_MEM_RAM)) { > > + ram_addr_t raddr =3D /*mmio->base |*/ addr; > > + void *ptr =3D qemu_get_ram_ptr(raddr); > > ...and/or this seems to lead to "Bad RAM pointer" (or so) when there's > ELF code loaded into the subpage at that address despite being IO_MEM_R= AM? > (Seen, e.g., if for RL78 I increase the page size from 12 to 16.) > addr is relative to the start of the page, instead of the start of the region. You can use mmio->region_offset[idx] to compensate. --=20 error compiling committee.c: too many arguments to function