Il 23/07/2013 18:23, Igor Mammedov ha scritto: > - if slot property is not specified on -device/device_add command, > treat default value as request for assigning DimmDevice to > the first free slot.
Even with "-m" instead of "-numa mem", I think this is problematic because we still need to separate the host and guest parts of the DIMM device. "-numa mem" (or the QMP command that Wanlong added) will be necessary to allocate memory on the host side before adding a DIMM. So slots will have three states: free (created with "-m"), allocated (a free slot moves to this state with "-numa mem...,populated=no" when migrating, or with the QMP command for regular hotplug), populated (an allocated slot moves to this state with "-device dimm"). You would be able to plug a DIMM only into an allocated slot, and the size will be specified on the slot rather than the DIMM device. In general, I don't think free slots should be managed by the DimmBus, and host vs. guest separation should be there even if we accept your "-m" extension (doesn't look bad at all, I must say). Paolo