On Wed, 24 Jul 2013 11:04:14 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 24/07/2013 10:40, Igor Mammedov ha scritto: > > On Tue, 23 Jul 2013 19:11:31 +0200 > > Paolo Bonzini <pbonz...@redhat.com> wrote: > > > >> Il 23/07/2013 18:22, Igor Mammedov ha scritto: > >>> Signed-off-by: Igor Mammedov <imamm...@redhat.com> > >>> --- > >>> qemu-options.hx | 9 +++++++-- > >>> vl.c | 53 > >>> +++++++++++++++++++++++++++++++++++++++++++++++------ > >>> 2 files changed, 54 insertions(+), 8 deletions(-) > >>> > >>> diff --git a/qemu-options.hx b/qemu-options.hx > >>> index 137a39b..f799b3d 100644 > >>> --- a/qemu-options.hx > >>> +++ b/qemu-options.hx > >>> @@ -210,8 +210,13 @@ use is discouraged as it may be removed from future > >>> versions. > >>> ETEXI > >>> > >>> DEF("m", HAS_ARG, QEMU_OPTION_m, > >>> - "-m megs set virtual RAM size to megs MB [default=" > >>> - stringify(DEFAULT_RAM_SIZE) "]\n", QEMU_ARCH_ALL) > >>> + "-m [mem=]megs[,slots=n,maxmem=size]\n" > >>> + " set virtual RAM size to megs MB [default=" > >>> + stringify(DEFAULT_RAM_SIZE) "]\n" > >>> + " mem=start-up memory amount\n" > >>> + " slots=maximum number of hotplug slots\n" > >>> + " maxmem=maximum total amount of memory\n", > >>> + QEMU_ARCH_ALL) > >>> STEXI > >>> @item -m @var{megs} > >>> @findex -m > >>> diff --git a/vl.c b/vl.c > >>> index bf0c658..16c6f1e 100644 > >>> --- a/vl.c > >>> +++ b/vl.c > >>> @@ -516,6 +516,27 @@ static QemuOptsList qemu_realtime_opts = { > >>> }, > >>> }; > >>> > >>> +static QemuOptsList qemu_mem_opts = { > >>> + .name = "memory-opts", > >>> + .implied_opt_name = "mem", > >>> + .head = QTAILQ_HEAD_INITIALIZER(qemu_mem_opts.head), > >> > >> This should have > >> > >> .merge_lists = true, > > > > Just to clarify: is it to allow syntax like? > > -m 512 -m slots=X -m maxmem=Y > > Yes. In general, if "id" doesn't make sense the QemuOptsList should > have merge_lists=true. Thanks, pushed to memhp-wip branch > Paolo