From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjn7L-0003zf-0M for qemu-devel@nongnu.org; Sun, 08 Jan 2012 02:24:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rjn7K-0003Vt-26 for qemu-devel@nongnu.org; Sun, 08 Jan 2012 02:24:34 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:41457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjn7J-0003Vh-Ry for qemu-devel@nongnu.org; Sun, 08 Jan 2012 02:24:34 -0500 Message-ID: <4F09447F.4090509@weilnetz.de> Date: Sun, 08 Jan 2012 08:23:43 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1324389914-12246-1-git-send-email-avi@redhat.com> <1324389914-12246-3-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] vmstate, memory: decouple vmstate from memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jordan Justen Cc: quintela@redhat.com, Avi Kivity , qemu-devel@nongnu.org Am 08.01.2012 06:14, schrieb Jordan Justen: > Avi, > When using pflash_cfi01, I hit the assert(new_block) added above. It > seemed to be caused by the low bits of addr being 0x7. This seems to > be come from cpu_register_io_memory in memory_region_init_rom_device. > > Would this patch be an appropriate fix for this? > > diff --git a/exec.c b/exec.c > index b1d6602..b3ebc91 100644 > --- a/exec.c > +++ b/exec.c > @@ -2777,7 +2777,7 @@ void qemu_ram_set_idstr(ram_addr_t addr, const char *name, > > new_block = NULL; > QLIST_FOREACH(block,&ram_list.blocks, next) { > - if (block->offset == addr) { > + if (block->offset == (addr& TARGET_PAGE_MASK)) { > new_block = block; > break; > } > > -Jordan Hi, latest QEMU has a different patch for memory.c which fixes the same problem. Regards, Stefan