On 12/18/2012 05:41 AM, Vasilis Liaskovitis wrote:
Returns total physical memory available to guest in bytes, including hotplugged memory. Note that the number reported here may be different from what the guest sees e.g. if the guest has not logically onlined hotplugged memory.
This functionality is provided independently of a balloon device, since a guest can be using ACPI memory hotplug without using a balloon device.
v3->v4: Moved qmp command implementation to vl.c. This prevents a circular header dependency problem.
Generally, patch change history should occur...
Signed-off-by: Vasilis Liaskovitis vasilis.liaskovitis@profitbricks.com
...here, after the --- divider. It's useful in the email chain, but does not need to be part of the final git history.
+++ b/qapi-schema.json @@ -2903,6 +2903,17 @@ { 'command': 'query-target', 'returns': 'TargetInfo' }
## +# @query-memory-total: +# +# Returns total memory in bytes, including hotplugged dimms +# +# Returns: int +# +# Since: 1.4 +## +{ 'command': 'query-memory-total', 'returns': 'int' }
Any reason you can't name this just 'query-memory', and return a JSON dictionary instead of a single int, so that in the future you can add other memory parameters into the same call? For example, down the road we may want to report some 'newstat' without adding a new QMP command:
{ 'type': 'MemoryInfo', 'data': { 'total': 'int', 'newstat': 'int' } } { 'command': 'query-memory', 'returns': 'MemoryInfo' }