[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: |
Anthony PERARD |
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 15:42:21 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
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.
--
Anthony PERARD