summary refs log tree commit diff stats
path: root/hw/xen/xen_pt.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-06-22 13:28:42 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-06-22 13:28:42 +0100
commit6dad8260e82b69bd278685ee25209f5824360455 (patch)
tree35f9cd9961e3282e623f2312fe7f94c6e8e3c856 /hw/xen/xen_pt.h
parentb8d880ba6dcca098dc3a5d345a13bebdcce89c90 (diff)
downloadfocaccia-qemu-6dad8260e82b69bd278685ee25209f5824360455.tar.gz
focaccia-qemu-6dad8260e82b69bd278685ee25209f5824360455.zip
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>
Diffstat (limited to 'hw/xen/xen_pt.h')
-rw-r--r--hw/xen/xen_pt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h
index aa39a9aa5f..dbee3308fd 100644
--- a/hw/xen/xen_pt.h
+++ b/hw/xen/xen_pt.h
@@ -319,7 +319,7 @@ static inline bool xen_pt_has_msix_mapping(XenPCIPassthroughState *s, int bar)
 }
 
 extern void *pci_assign_dev_load_option_rom(PCIDevice *dev,
-                                            struct Object *owner, int *size,
+                                            int *size,
                                             unsigned int domain,
                                             unsigned int bus, unsigned int slot,
                                             unsigned int function);