From a7d69ff10b085ba6f8236600829532984cdea714 Mon Sep 17 00:00:00 2001 From: Bharata B Rao Date: Mon, 29 Jun 2015 13:50:22 +0530 Subject: pc,pc-dimm: Extract hotplug related fields in PCMachineState to a structure Move hotplug_memory_base and hotplug_memory fields of PCMachineState into a separate structure so that the same can be made use of from other architectures supporing memory hotplug. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- include/hw/mem/pc-dimm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/hw/mem') diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index f7b80b4..4bace7b 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -70,6 +70,17 @@ typedef struct PCDIMMDeviceClass { MemoryRegion *(*get_memory_region)(PCDIMMDevice *dimm); } PCDIMMDeviceClass; +/** + * MemoryHotplugState: + * @base: address in guest RAM address space where hotplug memory + * address space begins. + * @mr: hotplug memory address space container + */ +typedef struct MemoryHotplugState { + ram_addr_t base; + MemoryRegion mr; +} MemoryHotplugState; + uint64_t pc_dimm_get_free_addr(uint64_t address_space_start, uint64_t address_space_size, uint64_t *hint, uint64_t align, uint64_t size, -- cgit v1.1