From patchwork Tue Mar 3 14:47:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 445749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0788F1400F1 for ; Wed, 4 Mar 2015 01:49:10 +1100 (AEDT) Received: from localhost ([::1]:39064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSo8C-0005dG-2w for incoming@patchwork.ozlabs.org; Tue, 03 Mar 2015 09:49:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSo6n-0001mh-Lp for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:47:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSo6c-0003nJ-BV for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:47:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSo6c-0003nB-32 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:47:30 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t23ElTMC022373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Mar 2015 09:47:29 -0500 Received: from localhost (ovpn-113-132.phx2.redhat.com [10.3.113.132]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t23ElSZ4030989; Tue, 3 Mar 2015 09:47:28 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Tue, 3 Mar 2015 09:47:25 -0500 Message-Id: <1425394046-20064-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1425394046-20064-1-git-send-email-lcapitulino@redhat.com> References: <1425394046-20064-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: imammedo@redhat.com, pkrempa@redhat.com, paulo.vital@profitbricks.com Subject: [Qemu-devel] [PATCH 1/2] qemu-options.hx: improve -m description X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add memory hotplug options to the command-line format. Also, add a complete command-line example and improve description. Signed-off-by: Luiz Capitulino Reviewed-by: Igor Mammedov Reviewed-by: Paulo Vital --- qemu-options.hx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 85ca3ad..b0345ae 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -237,12 +237,24 @@ DEF("m", HAS_ARG, QEMU_OPTION_m, "NOTE: Some architectures might enforce a specific granularity\n", QEMU_ARCH_ALL) STEXI -@item -m [size=]@var{megs} +@item -m [size=]@var{megs}[,slots=n,maxmem=size] @findex -m -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally, -a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or -gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used -to set amount of hotluggable memory slots and possible maximum amount of memory. +Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB. +Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in +megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem} +could be used to set amount of hotpluggable memory slots and maximum amount of +memory. Note that @var{maxmem} must be aligned to the page size. + +For example, the following command-line sets the guest startup RAM size to +1GB, creates 3 slots to hotplug additional memory and sets the maximum +memory the guest can reach to 4GB: + +@example +qemu-system-x86_64 -m 1G,slots=3,maxmem=4G +@end example + +If @var{slots} and @var{maxmem} are not specified, memory hotplug won't +be enabled and the guest startup RAM will never increase. ETEXI DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,