diff options
| author | Bharata B Rao | 2015-06-29 10:20:23 +0200 |
|---|---|---|
| committer | Eduardo Habkost | 2015-07-03 22:47:58 +0200 |
| commit | 43bbb49ef7032a8bfdafbd02d0286512af161089 (patch) | |
| tree | 3919d86efe9423e54625c184c305f70c06505fa8 /include/hw/mem | |
| parent | pc,pc-dimm: Extract hotplug related fields in PCMachineState to a structure (diff) | |
| download | qemu-43bbb49ef7032a8bfdafbd02d0286512af161089.tar.gz qemu-43bbb49ef7032a8bfdafbd02d0286512af161089.tar.xz qemu-43bbb49ef7032a8bfdafbd02d0286512af161089.zip | |
pc,pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine
pc_dimm_plug() has code that will be needed for memory plug handlers
in other archs too. Extract code from pc_dimm_plug() into a generic
routine pc_dimm_memory_plug() that resides in pc-dimm.c. Also
correspondingly refactor re-usable unplug code into pc_dimm_memory_unplug().
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/mem')
| -rw-r--r-- | include/hw/mem/pc-dimm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 4bace7bed3..d83bf30ea9 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -90,4 +90,8 @@ int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp); int qmp_pc_dimm_device_list(Object *obj, void *opaque); uint64_t pc_existing_dimms_capacity(Error **errp); +void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms, + MemoryRegion *mr, uint64_t align, Error **errp); +void pc_dimm_memory_unplug(DeviceState *dev, MemoryHotplugState *hpms, + MemoryRegion *mr); #endif |
