diff options
author | David Hildenbrand <david@redhat.com> | 2018-04-23 18:51:21 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-05-07 10:00:02 -0300 |
commit | 1b6d6af21bd614d61b55a28177299a5c93b95cd9 (patch) | |
tree | 136ba1a8d1ae2a9fc7c04e8ca8d0d5246390a424 /include/hw/mem | |
parent | bb0831bdf45a61c83fa1def44ae391260ce2662d (diff) | |
download | qemu-1b6d6af21bd614d61b55a28177299a5c93b95cd9.zip qemu-1b6d6af21bd614d61b55a28177299a5c93b95cd9.tar.gz qemu-1b6d6af21bd614d61b55a28177299a5c93b95cd9.tar.bz2 |
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.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index e37fb5d..627c860 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); |