From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abWOd-0000VT-3R for qemu-devel@nongnu.org; Thu, 03 Mar 2016 11:46:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abWOc-00053E-06 for qemu-devel@nongnu.org; Thu, 03 Mar 2016 11:46:39 -0500 Sender: Paolo Bonzini References: <1455288361-30117-1-git-send-email-peter.maydell@linaro.org> <1455288361-30117-3-git-send-email-peter.maydell@linaro.org> From: Paolo Bonzini Message-ID: <56D86A64.1040909@redhat.com> Date: Thu, 3 Mar 2016 17:46:28 +0100 MIME-Version: 1.0 In-Reply-To: <1455288361-30117-3-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] loader: Add load_image_mr() to load ROM image to a MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Markus Armbruster , "Michael S. Tsirkin" On 12/02/2016 15:45, Peter Maydell wrote: > Add a new function load_image_mr(), which behaves like > load_image_targphys() except that it loads the ROM image to > a specified MemoryRegion rather than to a specified physical > address. This is useful when a ROM blob needs to be loaded > to a particular flash or ROM device but the address of that > device in the machine's address space is not known. (For > instance, ROMs in devices, or ROMs which might exist in > a different address space to the system address space.) > > Signed-off-by: Peter Maydell The patch looks good, in particular it should be fine for the non-fw_cfg uses of rom->mr. The fw_cfg interface to loader.c indeed should be turned upside-down so that the knowledge moves outside rom_add_file (to a rom_add_fwcfg function for example) and rom_add_file doesn't need to call rom_set_mr. Your patch is at least a step in the right direction, because it adds memory region support in the !fw_cfg case. So, Reviewed-by: Paolo Bonzini Thanks, Paolo