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: Anthony PERARD
Subject: Re: [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom()
Date: Tue, 5 Jun 2018 17:55:07 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

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,

-- 
Anthony PERARD



reply via email to

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