From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abkNX-0004cl-Or for qemu-devel@nongnu.org; Fri, 04 Mar 2016 02:42:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abkNW-0007b7-QS for qemu-devel@nongnu.org; Fri, 04 Mar 2016 02:42:27 -0500 Date: Fri, 4 Mar 2016 09:42:18 +0200 From: "Michael S. Tsirkin" Message-ID: <20160304074218.GA17059@redhat.com> References: <1455288361-30117-1-git-send-email-peter.maydell@linaro.org> <1455288361-30117-3-git-send-email-peter.maydell@linaro.org> <56D86A64.1040909@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56D86A64.1040909@redhat.com> 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: Paolo Bonzini Cc: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Markus Armbruster On Thu, Mar 03, 2016 at 05:46:28PM +0100, Paolo Bonzini wrote: > > > 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 I agree here. Reviewed-by: Michael S. Tsirkin