qemu/hw/xen
Peter Maydell 6dad8260e8 xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom()
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.

Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-22 13:28:42 +01:00
..
Makefile.objs pci-assign: Remove 2017-11-05 14:52:10 +01:00
trace-events trace-events: fix code style: %# -> 0x% 2017-08-01 12:13:07 +01:00
xen-common.c xen: Expect xenstore write to fail when restricted 2018-04-26 16:29:51 +01:00
xen-host-pci-device.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
xen-host-pci-device.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xen_backend.c xen_backend: make the xen_feature_grant_copy flag private 2018-05-22 11:43:21 -07:00
xen_devconfig.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
xen_pt.c xen/pt: use address_space_memory object for memory region hooks 2018-05-18 11:01:52 -07:00
xen_pt.h xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() 2018-06-22 13:28:42 +01:00
xen_pt_config_init.c xen_pt: Present the size of 64 bit BARs correctly 2018-05-18 11:03:19 -07:00
xen_pt_graphics.c xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() 2018-06-22 13:28:42 +01:00
xen_pt_load_rom.c xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() 2018-06-22 13:28:42 +01:00
xen_pt_msi.c Make MemoryRegion valid.accepts callback take a MemTxAttrs argument 2018-05-31 16:32:35 +01:00
xen_pvdev.c xen: create qdev for each backend device 2016-11-22 10:29:39 -08:00