From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTpvr-0008IY-SO for qemu-devel@nongnu.org; Fri, 15 Jun 2018 10:42:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTpvo-0005aO-Fo for qemu-devel@nongnu.org; Fri, 15 Jun 2018 10:42:31 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:4674) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTpvo-0005Xi-3t for qemu-devel@nongnu.org; Fri, 15 Jun 2018 10:42:28 -0400 Date: Fri, 15 Jun 2018 15:42:21 +0100 From: Anthony PERARD Message-ID: <20180615144221.GD2165@perard.uk.xensource.com> References: <20180601175910.28146-1-peter.maydell@linaro.org> <20180605165507.GB2165@perard.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , "patches@linaro.org" , Stefano Stabellini , "open list:X86" On Fri, Jun 15, 2018 at 11:06:47AM +0100, Peter Maydell wrote: > On 5 June 2018 at 17:55, Anthony PERARD wrote: > > On Fri, Jun 01, 2018 at 06:59:10PM +0100, Peter Maydell wrote: > >> The xen pci_assign_dev_load_option_rom() currently creates a RAM > >> memory region with memory_region_init_ram_nomigrate(), and then > >> manually registers it with vmstate_register_ram(). In fact for > >> its only callsite, the 'owner' pointer we use for the init call > >> and the '&dev->qdev' pointer we use for the vmstate_register_ram() > >> call refer to the same object. Simplify the function to only > >> take a pointer to the device once instead of twice, and use > >> memory_region_init_ram() which automatically does the vmstate > >> register for us. > >> > >> Signed-off-by: Peter Maydell > >> --- > >> This is a fairly trivial no-behaviour-change code cleanup, but > >> I've marked it as RFC because I don't have a setup for doing > >> more than just compile-testing Xen related patches. > >> This was found as part of a sweep through for code using > >> the _nomigrate versions of functions. > > > > That patch looks fine, and seams fine after hacking my way into testing > > the change. > > > > Acked-by: Anthony PERARD > > Thanks for the review. Stefano, do you want to take it via the > xen subtree? Hi Peter, We don't have any other patch for xen, so feel free to commit this one. -- Anthony PERARD