diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-06-02 15:25:13 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-19 16:41:49 +0300 |
commit | 0b3125711606374f04e279aebefcb7275480f040 (patch) | |
tree | 4d917c4e2c127a6d044aa3a0113ed7f67e9a0c16 /block | |
parent | 95bee274fd1d22dc6d35e52987f8b5d29fe754dd (diff) |
pc-dimm: add busy address check and address auto-allocation
- if 'addr' property is not specified on -device/device_add command,
treat the default value as request for assigning PCDIMMDevice to
the first free memory region.
- if 'addr' is provided with -device/device_add command, attempt to
use it or fail command if it's already occupied or falls inside
of an existing PCDIMMDevice memory region.
Note:
GCompareFunc(a, b) used by g_slist_insert_sorted() returns 'gint',
however it might be too small to fit difference between
2 addresses. So use 128bit to calculate the difference and normalize
result to -1/0/1 return values.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Andrey Korolyov <andrey@xdel.ru>
MST: commit log tweaks
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions