From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Kdu-0002fy-SG for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2Kdr-0008BC-Ug for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:27:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Kdr-0008Ay-NJ for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:27:35 -0400 Date: Thu, 25 Jul 2013 15:28:54 +0300 From: "Michael S. Tsirkin" Message-ID: <20130725122854.GA367@redhat.com> References: <1374681580-17439-1-git-send-email-mst@redhat.com> <1374681580-17439-8-git-send-email-mst@redhat.com> <51F116B0.5030506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F116B0.5030506@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 07/14] loader: support for unmapped ROM blobs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Michael Walle , qemu-devel@nongnu.org On Thu, Jul 25, 2013 at 02:14:40PM +0200, Gerd Hoffmann wrote: > On 07/24/13 18:01, Michael S. Tsirkin wrote: > > QTAILQ_FOREACH(rom, &roms, next) { > > + if (rom->mr) { > > + continue; > > + } > > if (rom->fw_file) { > > continue; > > } > > if (rom->data == NULL) { > > continue; > > } > > - cpu_physical_memory_write_rom(rom->addr, rom->data, rom->datasize); > > + if (rom->mr) { > > + void *host = memory_region_get_ram_ptr(rom->mr); > > + memcpy(host, rom->data, rom->datasize); > > I think this code never ever runs ... > > cheers, > Gerd > Could you be clearer please? This chunk is in rom_reset, I think it runs on reset.