qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] Add the standby-mem machine option


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/5] Add the standby-mem machine option
Date: Tue, 17 Dec 2013 11:09:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 16/12/2013 21:51, Matthew Rosato ha scritto:
> Add the machine=...,standby-mem={size} option and associated
> documentation.

See how Igor Mammedov's x86 memory hotplug instead added "-m NN,maxmem=NN".

You could use these two patches:

http://lists.gnu.org/archive/html/qemu-devel/2013-11/msg03438.html
http://lists.gnu.org/archive/html/qemu-devel/2013-11/msg03439.html

Paolo

> Signed-off-by: Matthew Rosato <address@hidden>
> ---
>  qemu-options.hx |    6 +++++-
>  vl.c            |    6 ++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index af34483..def4493 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -35,7 +35,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
>      "                kernel_irqchip=on|off controls accelerated irqchip 
> support\n"
>      "                kvm_shadow_mem=size of KVM shadow MMU\n"
>      "                dump-guest-core=on|off include guest memory in a core 
> dump (default=on)\n"
> -    "                mem-merge=on|off controls memory merge support 
> (default: on)\n",
> +    "                mem-merge=on|off controls memory merge support 
> (default: on)\n"
> +    "                standby-mem=size sets size of additional offline 
> memory\n",
>      QEMU_ARCH_ALL)
>  STEXI
>  @item -machine address@hidden,address@hidden,...]]
> @@ -58,6 +59,9 @@ Include guest memory in a core dump. The default is on.
>  Enables or disables memory merge support. This feature, when supported by
>  the host, de-duplicates identical memory pages among VMs instances
>  (enabled by default).
> address@hidden standby-mem=size
> +Defines the size, in megabytes, of additional memory to be left offline for
> +future hotplug by the guest.
>  @end table
>  ETEXI
>  
> diff --git a/vl.c b/vl.c
> index b0399de..7d58d24 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -187,6 +187,7 @@ DisplayType display_type = DT_DEFAULT;
>  static int display_remote;
>  const char* keyboard_layout = NULL;
>  ram_addr_t ram_size;
> +ram_addr_t standby_mem_size;
>  const char *mem_path = NULL;
>  int mem_prealloc = 0; /* force preallocation of physical target memory */
>  int nb_nics;
> @@ -430,6 +431,10 @@ static QemuOptsList qemu_machine_opts = {
>              .name = "firmware",
>              .type = QEMU_OPT_STRING,
>              .help = "firmware image",
> +        },{
> +            .name = "standby-mem",
> +            .type = QEMU_OPT_SIZE,
> +            .help = "standby memory size",
>          },
>          { /* End of list */ }
>      },
> @@ -2906,6 +2911,7 @@ int main(int argc, char **argv, char **envp)
>      machine = find_default_machine();
>      cpu_model = NULL;
>      ram_size = 0;
> +    standby_mem_size = 0;
>      snapshot = 0;
>      cyls = heads = secs = 0;
>      translation = BIOS_ATA_TRANSLATION_AUTO;
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]