qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate()


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom()
Date: Fri, 15 Jun 2018 08:38:09 -0700 (PDT)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

On Fri, 15 Jun 2018, Anthony PERARD wrote:
> On Fri, Jun 15, 2018 at 11:06:47AM +0100, Peter Maydell wrote:
> > On 5 June 2018 at 17:55, Anthony PERARD <address@hidden> 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 <address@hidden>
> > >> ---
> > >> 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 <address@hidden>
> > 
> > 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.

Yep, go ahead



reply via email to

[Prev in Thread] Current Thread [Next in Thread]