summaryrefslogtreecommitdiff
path: root/include/hw/mem
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-04-23 18:51:21 +0200
committerEduardo Habkost <ehabkost@redhat.com>2018-05-07 10:00:02 -0300
commit1b6d6af21bd614d61b55a28177299a5c93b95cd9 (patch)
tree136ba1a8d1ae2a9fc7c04e8ca8d0d5246390a424 /include/hw/mem
parentbb0831bdf45a61c83fa1def44ae391260ce2662d (diff)
downloadqemu-1b6d6af21bd614d61b55a28177299a5c93b95cd9.zip
pc-dimm: factor out capacity and slot checks into MemoryDevice
Move the checks into memory_device_get_free_addr(). This will check before doing any calculations if we have KVM/vhost slots left and if the total region size would be exceeded. Of course, while at it, make it independent of pc-dimm code. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180423165126.15441-7-david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/mem')
-rw-r--r--include/hw/mem/pc-dimm.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index e37fb5d5db..627c8601d9 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -78,7 +78,6 @@ typedef struct PCDIMMDeviceClass {
int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp);
-uint64_t pc_existing_dimms_capacity(Error **errp);
void pc_dimm_memory_plug(DeviceState *dev, MachineState *machine,
uint64_t align, Error **errp);
void pc_dimm_memory_unplug(DeviceState *dev, MachineState *machine);