* [Qemu-devel] [PATCH v2 0/2] convert -m to QemuOpts @ 2014-02-13 13:50 Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 1/2] QemuOpts: introduce qemu_find_opts_singleton Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts Igor Mammedov 0 siblings, 2 replies; 9+ messages in thread From: Igor Mammedov @ 2014-02-13 13:50 UTC (permalink / raw) To: qemu-devel Cc: kwolf, peter.crosthwaite, aliguori, mjt, armbru, mreitz, stefanha, lcapitulino, pbonzini, akong, lersek changes since v1: - check for overflow - check for empty mem="" case - reshuffle code to avoid conflicts with another series on list - some style/typo fixes changes since RFC: - resolved conflict with error_abort change in qemu_get_machine_opts() git tree for testing: https://github.com/imammedo/qemu/tree/qoptify-m.v2 Igor Mammedov (1): vl: convert -m to QemuOpts Paolo Bonzini (1): QemuOpts: introduce qemu_find_opts_singleton include/qemu/config-file.h | 2 + qemu-options.hx | 12 ++++-- util/qemu-config.c | 14 ++++++++ vl.c | 79 ++++++++++++++++++++++++++++++++------------ 4 files changed, 82 insertions(+), 25 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v2 1/2] QemuOpts: introduce qemu_find_opts_singleton 2014-02-13 13:50 [Qemu-devel] [PATCH v2 0/2] convert -m to QemuOpts Igor Mammedov @ 2014-02-13 13:50 ` Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts Igor Mammedov 1 sibling, 0 replies; 9+ messages in thread From: Igor Mammedov @ 2014-02-13 13:50 UTC (permalink / raw) To: qemu-devel Cc: kwolf, peter.crosthwaite, aliguori, mjt, armbru, mreitz, stefanha, lcapitulino, pbonzini, akong, lersek From: Paolo Bonzini <pbonzini@redhat.com> Allows to use singleton idiom for getting access to a specified option list pre-creating it if necessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> --- include/qemu/config-file.h | 2 ++ util/qemu-config.c | 14 ++++++++++++++ vl.c | 11 +---------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h index dbd97c4..d4ba20e 100644 --- a/include/qemu/config-file.h +++ b/include/qemu/config-file.h @@ -8,6 +8,8 @@ QemuOptsList *qemu_find_opts(const char *group); QemuOptsList *qemu_find_opts_err(const char *group, Error **errp); +QemuOpts *qemu_find_opts_singleton(const char *group); + void qemu_add_opts(QemuOptsList *list); void qemu_add_drive_opts(QemuOptsList *list); int qemu_set_option(const char *str); diff --git a/util/qemu-config.c b/util/qemu-config.c index 9298f55..9dfacbc 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -39,6 +39,20 @@ QemuOptsList *qemu_find_opts(const char *group) return ret; } +QemuOpts *qemu_find_opts_singleton(const char *group) +{ + QemuOptsList *list; + QemuOpts *opts; + + list = qemu_find_opts(group); + assert(list); + opts = qemu_opts_find(list, NULL); + if (!opts) { + opts = qemu_opts_create(list, NULL, 0, &error_abort); + } + return opts; +} + static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc *desc) { CommandLineParameterInfoList *param_list = NULL, *entry; diff --git a/vl.c b/vl.c index 383be1b..7f2595c 100644 --- a/vl.c +++ b/vl.c @@ -539,16 +539,7 @@ static QemuOptsList qemu_msg_opts = { */ QemuOpts *qemu_get_machine_opts(void) { - QemuOptsList *list; - QemuOpts *opts; - - list = qemu_find_opts("machine"); - assert(list); - opts = qemu_opts_find(list, NULL); - if (!opts) { - opts = qemu_opts_create(list, NULL, 0, &error_abort); - } - return opts; + return qemu_find_opts_singleton("machine"); } const char *qemu_get_vm_name(void) -- 1.7.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts 2014-02-13 13:50 [Qemu-devel] [PATCH v2 0/2] convert -m to QemuOpts Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 1/2] QemuOpts: introduce qemu_find_opts_singleton Igor Mammedov @ 2014-02-13 13:50 ` Igor Mammedov 2014-02-13 15:14 ` Eric Blake 2014-02-13 16:13 ` [Qemu-devel] [PATCH v3] " Igor Mammedov 1 sibling, 2 replies; 9+ messages in thread From: Igor Mammedov @ 2014-02-13 13:50 UTC (permalink / raw) To: qemu-devel Cc: kwolf, peter.crosthwaite, aliguori, mjt, armbru, mreitz, stefanha, lcapitulino, pbonzini, akong, lersek Adds option to -m "mem" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- v2: - various fixes suggested by Laszlo Ersek <lersek@redhat.com> - check for overflow - check for empty mem="" case - reshuffle code to avoid conflicts with another series on list - some style/typo fixes --- qemu-options.hx | 12 ++++++--- vl.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 15 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 56e5fdf..42f7b64 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -210,14 +210,18 @@ 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=]size\n" + " configure guest RAM size\n" + " mem: initial amount of guest memory (default: " + stringify(DEFAULT_RAM_SIZE) "MB)\n", + QEMU_ARCH_ALL) STEXI @item -m @var{megs} @findex -m -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally, +Set virtual RAM size to @var{size} megabytes. Default is 128 MiB. Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or -gigabytes respectively. +gigabytes respectively. If @var{size} is provided without unit suffix then MB +is assumed. ETEXI DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath, diff --git a/vl.c b/vl.c index 7f2595c..410059d 100644 --- a/vl.c +++ b/vl.c @@ -302,6 +302,21 @@ static struct { { .driver = "qxl-vga", .flag = &default_vga }, }; +#define MEMORY_OPTS "memory-opts" +static QemuOptsList qemu_mem_opts = { + .name = MEMORY_OPTS, + .implied_opt_name = "mem", + .head = QTAILQ_HEAD_INITIALIZER(qemu_mem_opts.head), + .merge_lists = true, + .desc = { + { + .name = "mem", + .type = QEMU_OPT_SIZE, + }, + { /* end of list */ } + }, +}; + static QemuOptsList qemu_rtc_opts = { .name = "rtc", .head = QTAILQ_HEAD_INITIALIZER(qemu_rtc_opts.head), @@ -2868,6 +2883,8 @@ int main(int argc, char **argv, char **envp) }; const char *trace_events = NULL; const char *trace_file = NULL; + const ram_addr_t default_ram_size = (ram_addr_t)DEFAULT_RAM_SIZE * + 1024 * 1024; atexit(qemu_run_exit_notifiers); error_set_progname(argv[0]); @@ -2884,6 +2901,7 @@ int main(int argc, char **argv, char **envp) module_call_init(MODULE_INIT_QOM); + qemu_add_opts(&qemu_mem_opts); qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); qemu_add_drive_opts(&qemu_common_drive_opts); @@ -2921,7 +2939,7 @@ int main(int argc, char **argv, char **envp) module_call_init(MODULE_INIT_MACHINE); machine = find_default_machine(); cpu_model = NULL; - ram_size = 0; + ram_size = default_ram_size; snapshot = 0; cyls = heads = secs = 0; translation = BIOS_ATA_TRANSLATION_AUTO; @@ -3198,16 +3216,45 @@ int main(int argc, char **argv, char **envp) exit(0); break; case QEMU_OPTION_m: { - int64_t value; uint64_t sz; - char *end; + const char *mem_str; + + opts = qemu_opts_parse(qemu_find_opts(MEMORY_OPTS), + optarg, 1); + if (!opts) { + exit(1); + } - value = strtosz(optarg, &end); - if (value < 0 || *end) { - fprintf(stderr, "qemu: invalid ram size: %s\n", optarg); + mem_str = qemu_opt_get(opts, "mem"); + if (!mem_str) { + fprintf(stderr, "qemu: invalid -m option, missing " + "'mem' option\n"); + exit(1); + } + if (!strlen(mem_str)) { + fprintf(stderr, "qemu: missing 'mem' option value\n"); exit(1); } - sz = QEMU_ALIGN_UP((uint64_t)value, 8192); + + sz = qemu_opt_get_size(opts, "mem", ram_size); + + /* Fix up legacy suffix-less format */ + if (g_ascii_isdigit(mem_str[strlen(mem_str) - 1])) { + uint64_t overflow_check = sz; + + sz <<= 20; + if ((sz >> 20) != overflow_check) { + fprintf(stderr, "qemu: too large 'mem' option " + "value\n"); + } + } + + /* backward compatibility behaviour for case "-m 0" */ + if (sz == 0) { + sz = default_ram_size; + } + + sz = QEMU_ALIGN_UP(sz, 8192); ram_size = sz; if (ram_size != sz) { fprintf(stderr, "qemu: ram size too large\n"); @@ -4056,10 +4103,9 @@ int main(int argc, char **argv, char **envp) exit(1); } - /* init the memory */ - if (ram_size == 0) { - ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; - } + /* store value for the future use */ + qemu_opt_set_number(qemu_find_opts_singleton(MEMORY_OPTS), + "mem", ram_size); if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0) != 0) { -- 1.7.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts Igor Mammedov @ 2014-02-13 15:14 ` Eric Blake 2014-02-13 16:13 ` [Qemu-devel] [PATCH v3] " Igor Mammedov 1 sibling, 0 replies; 9+ messages in thread From: Eric Blake @ 2014-02-13 15:14 UTC (permalink / raw) To: Igor Mammedov, qemu-devel Cc: kwolf, peter.crosthwaite, akong, stefanha, mjt, armbru, mreitz, aliguori, pbonzini, lcapitulino, lersek [-- Attachment #1: Type: text/plain, Size: 2977 bytes --] On 02/13/2014 06:50 AM, Igor Mammedov wrote: > Adds option to -m > "mem" - startup memory amount > > For compatibility with legacy CLI if suffix-less number is passed, > it assumes amount in Mb. > > Otherwise user is free to use suffixed number using suffixes b,k/K,M,G > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > v2: > - various fixes suggested by Laszlo Ersek <lersek@redhat.com> > - check for overflow > - check for empty mem="" case > - reshuffle code to avoid conflicts with another series on list > - some style/typo fixes > --- > qemu-options.hx | 12 ++++++--- > vl.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++--------- > 2 files changed, 65 insertions(+), 15 deletions(-) > > + " configure guest RAM size\n" > + " mem: initial amount of guest memory (default: " > + stringify(DEFAULT_RAM_SIZE) "MB)\n", MB here... > + QEMU_ARCH_ALL) > STEXI > @item -m @var{megs} > @findex -m > -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally, > +Set virtual RAM size to @var{size} megabytes. Default is 128 MiB. Optionally, > a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or > -gigabytes respectively. > +gigabytes respectively. If @var{size} is provided without unit suffix then MB > +is assumed. ...and inconsistent on MiB vs MB here. If we're going to use MiB (which is the correct term), it would be worth using it everywhere. > + opts = qemu_opts_parse(qemu_find_opts(MEMORY_OPTS), > + optarg, 1); > + if (!opts) { > + exit(1); I prefer EXIT_FAILURE, but that's a change for another patch (you're just following conventions). > + if (!strlen(mem_str)) { More efficient as 'if (!*mem_str)'... > + fprintf(stderr, "qemu: missing 'mem' option value\n"); > exit(1); > } > - sz = QEMU_ALIGN_UP((uint64_t)value, 8192); > + > + sz = qemu_opt_get_size(opts, "mem", ram_size); > + > + /* Fix up legacy suffix-less format */ > + if (g_ascii_isdigit(mem_str[strlen(mem_str) - 1])) { ...either that, or cache your strlen() result so you only call it once. > + uint64_t overflow_check = sz; > + > + sz <<= 20; > + if ((sz >> 20) != overflow_check) { > + fprintf(stderr, "qemu: too large 'mem' option " > + "value\n"); > + } > + } What? We print the warning, but then use the bogus value? Missing exit(). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 604 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v3] vl: convert -m to QemuOpts 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts Igor Mammedov 2014-02-13 15:14 ` Eric Blake @ 2014-02-13 16:13 ` Igor Mammedov 2014-02-13 17:45 ` Eric Blake 2014-02-17 16:18 ` Paolo Bonzini 1 sibling, 2 replies; 9+ messages in thread From: Igor Mammedov @ 2014-02-13 16:13 UTC (permalink / raw) To: qemu-devel Cc: kwolf, peter.crosthwaite, aliguori, mjt, armbru, mreitz, stefanha, lcapitulino, pbonzini, akong, lersek Adds option to -m "mem" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in MiB. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- v3: - fixes suggested by Eric Blake <eblake@redhat.com> - check for empty string in more efficient way - fix MB/MiB inconsistency - use EXIT_FAILURE instead of 1 - add missing exit() if overflow occurres v2: - various fixes suggested by Laszlo Ersek <lersek@redhat.com> - check for overflow - check for empty mem="" case - reshuffle code to avoid conflicts with another series on list - some style/typo fixes --- qemu-options.hx | 12 ++++++--- vl.c | 73 +++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 17 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 56e5fdf..2057fc6 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -210,14 +210,18 @@ 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=]size\n" + " configure guest RAM size\n" + " mem: initial amount of guest memory (default: " + stringify(DEFAULT_RAM_SIZE) "MiB)\n", + QEMU_ARCH_ALL) STEXI @item -m @var{megs} @findex -m -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally, +Set virtual RAM size to @var{size} megabytes. Default is 128 MiB. Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or -gigabytes respectively. +gigabytes respectively. If @var{size} is provided without unit suffix then MiB +is assumed. ETEXI DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath, diff --git a/vl.c b/vl.c index 7f2595c..64a695b 100644 --- a/vl.c +++ b/vl.c @@ -302,6 +302,21 @@ static struct { { .driver = "qxl-vga", .flag = &default_vga }, }; +#define MEMORY_OPTS "memory-opts" +static QemuOptsList qemu_mem_opts = { + .name = MEMORY_OPTS, + .implied_opt_name = "mem", + .head = QTAILQ_HEAD_INITIALIZER(qemu_mem_opts.head), + .merge_lists = true, + .desc = { + { + .name = "mem", + .type = QEMU_OPT_SIZE, + }, + { /* end of list */ } + }, +}; + static QemuOptsList qemu_rtc_opts = { .name = "rtc", .head = QTAILQ_HEAD_INITIALIZER(qemu_rtc_opts.head), @@ -2868,6 +2883,8 @@ int main(int argc, char **argv, char **envp) }; const char *trace_events = NULL; const char *trace_file = NULL; + const ram_addr_t default_ram_size = (ram_addr_t)DEFAULT_RAM_SIZE * + 1024 * 1024; atexit(qemu_run_exit_notifiers); error_set_progname(argv[0]); @@ -2884,6 +2901,7 @@ int main(int argc, char **argv, char **envp) module_call_init(MODULE_INIT_QOM); + qemu_add_opts(&qemu_mem_opts); qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); qemu_add_drive_opts(&qemu_common_drive_opts); @@ -2921,7 +2939,7 @@ int main(int argc, char **argv, char **envp) module_call_init(MODULE_INIT_MACHINE); machine = find_default_machine(); cpu_model = NULL; - ram_size = 0; + ram_size = default_ram_size; snapshot = 0; cyls = heads = secs = 0; translation = BIOS_ATA_TRANSLATION_AUTO; @@ -3198,20 +3216,50 @@ int main(int argc, char **argv, char **envp) exit(0); break; case QEMU_OPTION_m: { - int64_t value; uint64_t sz; - char *end; + const char *mem_str; - value = strtosz(optarg, &end); - if (value < 0 || *end) { - fprintf(stderr, "qemu: invalid ram size: %s\n", optarg); - exit(1); + opts = qemu_opts_parse(qemu_find_opts(MEMORY_OPTS), + optarg, 1); + if (!opts) { + exit(EXIT_FAILURE); + } + + mem_str = qemu_opt_get(opts, "mem"); + if (!mem_str) { + fprintf(stderr, "qemu: invalid -m option, missing " + "'mem' option\n"); + exit(EXIT_FAILURE); + } + if (!*mem_str) { + fprintf(stderr, "qemu: missing 'mem' option value\n"); + exit(EXIT_FAILURE); + } + + sz = qemu_opt_get_size(opts, "mem", ram_size); + + /* Fix up legacy suffix-less format */ + if (g_ascii_isdigit(mem_str[strlen(mem_str) - 1])) { + uint64_t overflow_check = sz; + + sz <<= 20; + if ((sz >> 20) != overflow_check) { + fprintf(stderr, "qemu: too large 'mem' option " + "value\n"); + exit(EXIT_FAILURE); + } + } + + /* backward compatibility behaviour for case "-m 0" */ + if (sz == 0) { + sz = default_ram_size; } - sz = QEMU_ALIGN_UP((uint64_t)value, 8192); + + sz = QEMU_ALIGN_UP(sz, 8192); ram_size = sz; if (ram_size != sz) { fprintf(stderr, "qemu: ram size too large\n"); - exit(1); + exit(EXIT_FAILURE); } break; } @@ -4056,10 +4104,9 @@ int main(int argc, char **argv, char **envp) exit(1); } - /* init the memory */ - if (ram_size == 0) { - ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; - } + /* store value for the future use */ + qemu_opt_set_number(qemu_find_opts_singleton(MEMORY_OPTS), + "mem", ram_size); if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0) != 0) { -- 1.7.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v3] vl: convert -m to QemuOpts 2014-02-13 16:13 ` [Qemu-devel] [PATCH v3] " Igor Mammedov @ 2014-02-13 17:45 ` Eric Blake 2014-02-13 20:06 ` Laszlo Ersek 2014-02-17 16:18 ` Paolo Bonzini 1 sibling, 1 reply; 9+ messages in thread From: Eric Blake @ 2014-02-13 17:45 UTC (permalink / raw) To: Igor Mammedov, qemu-devel Cc: kwolf, peter.crosthwaite, akong, stefanha, mjt, armbru, mreitz, aliguori, pbonzini, lcapitulino, lersek [-- Attachment #1: Type: text/plain, Size: 790 bytes --] On 02/13/2014 09:13 AM, Igor Mammedov wrote: > Adds option to -m > "mem" - startup memory amount > > For compatibility with legacy CLI if suffix-less number is passed, > it assumes amount in MiB. > > Otherwise user is free to use suffixed number using suffixes b,k/K,M,G > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > v3: > - fixes suggested by Eric Blake <eblake@redhat.com> > - check for empty string in more efficient way > - fix MB/MiB inconsistency > - use EXIT_FAILURE instead of 1 > - add missing exit() if overflow occurres Reviewed-by: Eric Blake <eblake@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 604 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v3] vl: convert -m to QemuOpts 2014-02-13 17:45 ` Eric Blake @ 2014-02-13 20:06 ` Laszlo Ersek 0 siblings, 0 replies; 9+ messages in thread From: Laszlo Ersek @ 2014-02-13 20:06 UTC (permalink / raw) To: Igor Mammedov Cc: kwolf, peter.crosthwaite, akong, stefanha, mjt, qemu-devel, armbru, aliguori, lcapitulino, pbonzini, mreitz On 02/13/14 18:45, Eric Blake wrote: > On 02/13/2014 09:13 AM, Igor Mammedov wrote: >> Adds option to -m >> "mem" - startup memory amount >> >> For compatibility with legacy CLI if suffix-less number is passed, >> it assumes amount in MiB. >> >> Otherwise user is free to use suffixed number using suffixes b,k/K,M,G >> >> Signed-off-by: Igor Mammedov <imammedo@redhat.com> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> --- >> v3: >> - fixes suggested by Eric Blake <eblake@redhat.com> >> - check for empty string in more efficient way >> - fix MB/MiB inconsistency >> - use EXIT_FAILURE instead of 1 >> - add missing exit() if overflow occurres > > Reviewed-by: Eric Blake <eblake@redhat.com> Me too: Reviewed-by: Laszlo Ersek <lersek@redhat.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v3] vl: convert -m to QemuOpts 2014-02-13 16:13 ` [Qemu-devel] [PATCH v3] " Igor Mammedov 2014-02-13 17:45 ` Eric Blake @ 2014-02-17 16:18 ` Paolo Bonzini 2014-02-17 16:42 ` Luiz Capitulino 1 sibling, 1 reply; 9+ messages in thread From: Paolo Bonzini @ 2014-02-17 16:18 UTC (permalink / raw) To: Igor Mammedov, qemu-devel Cc: kwolf, peter.crosthwaite, akong, stefanha, mjt, armbru, mreitz, aliguori, lcapitulino, lersek Il 13/02/2014 17:13, Igor Mammedov ha scritto: > Adds option to -m > "mem" - startup memory amount > > For compatibility with legacy CLI if suffix-less number is passed, > it assumes amount in MiB. > > Otherwise user is free to use suffixed number using suffixes b,k/K,M,G > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> I am applying this to a NUMA branch that will be on top of Luiz's qmp queue. Because of this, it will be rebased. Paolo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v3] vl: convert -m to QemuOpts 2014-02-17 16:18 ` Paolo Bonzini @ 2014-02-17 16:42 ` Luiz Capitulino 0 siblings, 0 replies; 9+ messages in thread From: Luiz Capitulino @ 2014-02-17 16:42 UTC (permalink / raw) To: Paolo Bonzini Cc: kwolf, peter.crosthwaite, akong, stefanha, mjt, qemu-devel, armbru, aliguori, Igor Mammedov, mreitz, lersek On Mon, 17 Feb 2014 17:18:25 +0100 Paolo Bonzini <pbonzini@redhat.com> wrote: > Il 13/02/2014 17:13, Igor Mammedov ha scritto: > > Adds option to -m > > "mem" - startup memory amount > > > > For compatibility with legacy CLI if suffix-less number is passed, > > it assumes amount in MiB. > > > > Otherwise user is free to use suffixed number using suffixes b,k/K,M,G > > > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > I am applying this to a NUMA branch that will be on top of Luiz's qmp > queue. Because of this, it will be rebased. My queue is going to be rebased because it broke the build... And, as you have a NUMA branch: http://lists.nongnu.org/archive/html/qemu-devel/2014-02/msg02484.html ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-02-17 16:42 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-02-13 13:50 [Qemu-devel] [PATCH v2 0/2] convert -m to QemuOpts Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 1/2] QemuOpts: introduce qemu_find_opts_singleton Igor Mammedov 2014-02-13 13:50 ` [Qemu-devel] [PATCH v2 2/2] vl: convert -m to QemuOpts Igor Mammedov 2014-02-13 15:14 ` Eric Blake 2014-02-13 16:13 ` [Qemu-devel] [PATCH v3] " Igor Mammedov 2014-02-13 17:45 ` Eric Blake 2014-02-13 20:06 ` Laszlo Ersek 2014-02-17 16:18 ` Paolo Bonzini 2014-02-17 16:42 ` Luiz Capitulino
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).