On 12/18/2012 05:41 AM, Vasilis Liaskovitis wrote:
Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. This patch implements a tail queue to store guest notifications for memory hot-add and hot-remove requests.
Guest responses for memory hotplug command on a per-dimm basis can be detected with the new hmp command "info memory-hotplug" or the new qmp command "query-memory-hotplug"
Examples:
(qemu) device_add dimm,id=ram0 (qemu) info memory-hotplug dimm: ram0 hot-add success or dimm: ram0 hot-add failure
+++ b/qapi-schema.json @@ -2940,6 +2940,32 @@ { 'command': 'query-dimm-info', 'returns': ['DimmInfo'] }
## +# @MemHpInfo: +# +# Information about status of a memory hotplug command +# +# @dimm: the Dimm associated with the result
Didn't document @request.
+# +# @result: the result of the hotplug command +# +# Since: 1.4 +# +## +{ 'type': 'MemHpInfo',
- 'data': {'dimm': 'str', 'request': 'str', 'result': 'str'} }
Instead of open-coding 'request' and 'result' as an arbitrary string, it would be nicer to have them be an enum type with a finite subset of expected values.
+## +# @query-memory-hotplug: +# +# Returns a list of information about pending hotplug commands +# +# Returns: a list of @MemhpInfo
s/MemhpInfo/MemHpInfo/
+# +# Since: 1.4 +## +{ 'command': 'query-memory-hotplug', 'returns': ['MemHpInfo'] }
+## # @QKeyCode: #