[SeaBIOS] [RFC PATCH v4 19/30] Implement "info memory-total" and "query-memory-total"

Vasilis Liaskovitis vasilis.liaskovitis at profitbricks.com
Thu Jan 10 18:42:33 CET 2013


On Fri, Jan 04, 2013 at 09:21:08AM -0700, Eric Blake wrote:
> 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 at 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.
ok, thanks.

> 
> > +++ 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:

I am fine with a dictionary, if we see a need for extending the command in the
future. Is it common practice to start off with dicts for simple commands? In
any case, I 'll update.

thanks,

- Vasilis



More information about the SeaBIOS mailing list