OSDN Git Service

pc-dimm: add busy slot check and slot auto-allocation
authorIgor Mammedov <imammedo@redhat.com>
Mon, 2 Jun 2014 13:25:14 +0000 (15:25 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Jun 2014 13:41:49 +0000 (16:41 +0300)
commit0cd03d89b98154fcc03d9a8eeea70b9c50cb9457
tree0b49df52f1d3c7a81fb4d7bc94fdc6e06b686dfe
parent0b3125711606374f04e279aebefcb7275480f040
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>
hw/i386/pc.c
hw/mem/pc-dimm.c
include/hw/mem/pc-dimm.h