summaryrefslogtreecommitdiffstats
path: root/include/hw/mem
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-06-02 15:25:14 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 16:41:49 +0300
commit0cd03d89b98154fcc03d9a8eeea70b9c50cb9457 (patch)
tree0b49df52f1d3c7a81fb4d7bc94fdc6e06b686dfe /include/hw/mem
parent0b3125711606374f04e279aebefcb7275480f040 (diff)
downloadhqemu-0cd03d89b98154fcc03d9a8eeea70b9c50cb9457.zip
hqemu-0cd03d89b98154fcc03d9a8eeea70b9c50cb9457.tar.gz
pc-dimm: add busy slot check and slot auto-allocation
- if slot property is not specified on -device/device_add command, treat default value as request for assigning PCDIMMDevice to the first free slot. - if slot is provided with -device/device_add command, attempt to use it or fail command if it's already occupied. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/mem')
-rw-r--r--include/hw/mem/pc-dimm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index 5a3e7df..0f4a6ba 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -74,4 +74,6 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
uint64_t address_space_size,
uint64_t *hint, uint64_t size,
Error **errp);
+
+int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp);
#endif
OpenPOWER on IntegriCloud