From 1b6d6af21bd614d61b55a28177299a5c93b95cd9 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 23 Apr 2018 18:51:21 +0200 Subject: 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 Message-Id: <20180423165126.15441-7-david@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Eduardo Habkost --- include/hw/mem/pc-dimm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/hw/mem/pc-dimm.h') 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); -- cgit v1.2.3