* [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options
@ 2014-03-27 6:57 Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 1/3] qmp: rename query_option_descs() to get_param_info() Amos Kong
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Amos Kong @ 2014-03-27 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: libvirt-list, armbru, anthony, pbonzini, afaerber
This patchset fixed some issues of query-command-line-options:
* some new options that haven't argument can't be queried. (eg: -enable-fips)
* some legacy options that have argument can't be queried. (eg: -vnc display)
More discussion:
http://marc.info/?l=qemu-devel&m=139081830416684&w=2
https://www.redhat.com/archives/libvir-list/2014-March/msg00318.html
V2: remove duplicate option tables, update schema (eric)
V3: fix typo in commitlog and export qemu_options talbe (eric)
V4: avoid the duplicate static table (eric)
V5: rename new field, other fix (markus)
V6: add implied-name (eric, markus)
Thanks for your review!
Amos Kong (3):
qmp: rename query_option_descs() to get_param_info()
query-command-line-options: expose implicit parameter name
query-command-line-options: query all the options in qemu-options.hx
qapi-schema.json | 16 +++++++++++++---
qemu-options.h | 12 ++++++++++++
util/qemu-config.c | 52 ++++++++++++++++++++++++++++++++++++++--------------
vl.c | 19 ++-----------------
4 files changed, 65 insertions(+), 34 deletions(-)
--
1.8.5.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v6 1/3] qmp: rename query_option_descs() to get_param_info()
2014-03-27 6:57 [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
@ 2014-03-27 6:57 ` Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 2/3] query-command-line-options: expose implicit parameter name Amos Kong
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2014-03-27 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: libvirt-list, armbru, anthony, pbonzini, afaerber
Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
util/qemu-config.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/qemu-config.c b/util/qemu-config.c
index f610101..508adbc 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -39,7 +39,7 @@ QemuOptsList *qemu_find_opts(const char *group)
return ret;
}
-static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc *desc)
+static CommandLineParameterInfoList *get_param_info(const QemuOptDesc *desc)
{
CommandLineParameterInfoList *param_list = NULL, *entry;
CommandLineParameterInfo *info;
@@ -120,9 +120,9 @@ static CommandLineParameterInfoList *get_drive_infolist(void)
for (i = 0; drive_config_groups[i] != NULL; i++) {
if (!head) {
- head = query_option_descs(drive_config_groups[i]->desc);
+ head = get_param_info(drive_config_groups[i]->desc);
} else {
- cur = query_option_descs(drive_config_groups[i]->desc);
+ cur = get_param_info(drive_config_groups[i]->desc);
connect_infolist(head, cur);
}
}
@@ -147,7 +147,7 @@ CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
info->parameters = get_drive_infolist();
} else {
info->parameters =
- query_option_descs(vm_config_groups[i]->desc);
+ get_param_info(vm_config_groups[i]->desc);
}
entry = g_malloc0(sizeof(*entry));
entry->value = info;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v6 2/3] query-command-line-options: expose implicit parameter name
2014-03-27 6:57 [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 1/3] qmp: rename query_option_descs() to get_param_info() Amos Kong
@ 2014-03-27 6:57 ` Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 3/3] query-command-line-options: query all the options in qemu-options.hx Amos Kong
2014-03-27 7:16 ` [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
3 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2014-03-27 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: libvirt-list, armbru, anthony, pbonzini, afaerber
This patch added a new field to expose implicit parameter name,
we make it optional for compatibility.
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
---
qapi-schema.json | 6 +++++-
util/qemu-config.c | 24 +++++++++++++++---------
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 391356f..9341033 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4088,12 +4088,16 @@
#
# @help: #optional human readable text string, not suitable for parsing.
#
+# @implied-name: #optional, if present and true, the parameter can be
+# specified as '-option value' instead of the preferred
+# spelling of '-option name=value' (since 2.1)
+#
# Since 1.5
##
{ 'type': 'CommandLineParameterInfo',
'data': { 'name': 'str',
'type': 'CommandLineParameterType',
- '*help': 'str' } }
+ '*help': 'str', '*implied-name': 'bool' } }
##
# @CommandLineOptionInfo:
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 508adbc..85bb0c8 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -39,17 +39,23 @@ QemuOptsList *qemu_find_opts(const char *group)
return ret;
}
-static CommandLineParameterInfoList *get_param_info(const QemuOptDesc *desc)
+static CommandLineParameterInfoList *get_param_info(const QemuOptsList *list)
{
CommandLineParameterInfoList *param_list = NULL, *entry;
CommandLineParameterInfo *info;
int i;
- for (i = 0; desc[i].name != NULL; i++) {
+ for (i = 0; list->desc[i].name != NULL; i++) {
info = g_malloc0(sizeof(*info));
- info->name = g_strdup(desc[i].name);
+ info->name = g_strdup(list->desc[i].name);
- switch (desc[i].type) {
+ info->has_implied_name = true;
+ if (list->implied_opt_name && !strcmp(list->desc[i].name,
+ list->implied_opt_name)) {
+ info->implied_name = true;
+ }
+
+ switch (list->desc[i].type) {
case QEMU_OPT_STRING:
info->type = COMMAND_LINE_PARAMETER_TYPE_STRING;
break;
@@ -64,9 +70,9 @@ static CommandLineParameterInfoList *get_param_info(const QemuOptDesc *desc)
break;
}
- if (desc[i].help) {
+ if (list->desc[i].help) {
info->has_help = true;
- info->help = g_strdup(desc[i].help);
+ info->help = g_strdup(list->desc[i].help);
}
entry = g_malloc0(sizeof(*entry));
@@ -120,9 +126,9 @@ static CommandLineParameterInfoList *get_drive_infolist(void)
for (i = 0; drive_config_groups[i] != NULL; i++) {
if (!head) {
- head = get_param_info(drive_config_groups[i]->desc);
+ head = get_param_info(drive_config_groups[i]);
} else {
- cur = get_param_info(drive_config_groups[i]->desc);
+ cur = get_param_info(drive_config_groups[i]);
connect_infolist(head, cur);
}
}
@@ -147,7 +153,7 @@ CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
info->parameters = get_drive_infolist();
} else {
info->parameters =
- get_param_info(vm_config_groups[i]->desc);
+ get_param_info(vm_config_groups[i]);
}
entry = g_malloc0(sizeof(*entry));
entry->value = info;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v6 3/3] query-command-line-options: query all the options in qemu-options.hx
2014-03-27 6:57 [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 1/3] qmp: rename query_option_descs() to get_param_info() Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 2/3] query-command-line-options: expose implicit parameter name Amos Kong
@ 2014-03-27 6:57 ` Amos Kong
2014-03-27 7:16 ` [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
3 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2014-03-27 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: libvirt-list, armbru, anthony, pbonzini, afaerber
vm_config_groups[] only contains part of the options which have
parameters, and all options which have no parameter aren't added
to vm_config_groups[]. Current query-command-line-options only
checks options from vm_config_groups[], so some options will
be lost.
We have macro in qemu-options.hx to generate a table that
contains all the options. This patch tries to query options
from the table.
Then we won't lose the legacy options that weren't added to
vm_config_groups[] (eg: -vnc, -smbios). The options that have
no parameter will also be returned (eg: -enable-fips)
Some options that have parameters have a NULL desc list, some
options don't have parameters, and "parameters" is mandatory
in the past. So we add a new field "unspecified-parameters" to
present if the option takes unspecified parameters.
This patch also fixes options to match their actual command-line
spelling rather than an alternate name associated with the
option table in use by the command.
Signed-off-by: Amos Kong <akong@redhat.com>
---
qapi-schema.json | 10 ++++++++--
qemu-options.h | 12 ++++++++++++
util/qemu-config.c | 30 ++++++++++++++++++++++++------
vl.c | 19 ++-----------------
4 files changed, 46 insertions(+), 25 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 9341033..36812d4 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4106,12 +4106,18 @@
#
# @option: option name
#
-# @parameters: an array of @CommandLineParameterInfo
+# @parameters: array of @CommandLineParameterInfo, possibly empty
+#
+# @unspecified-parameters: @optional present if the @parameters array is empty.
+# If true, then the option takes unspecified
+# parameters, if false, then the option takes no
+# parameter (since 2.1)
#
# Since 1.5
##
{ 'type': 'CommandLineOptionInfo',
- 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
+ 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'],
+ '*unspecified-parameters': 'bool' } }
##
# @query-command-line-options:
diff --git a/qemu-options.h b/qemu-options.h
index 89a009e..4024487 100644
--- a/qemu-options.h
+++ b/qemu-options.h
@@ -28,9 +28,21 @@
#ifndef _QEMU_OPTIONS_H_
#define _QEMU_OPTIONS_H_
+#include "sysemu/arch_init.h"
+
enum {
#define QEMU_OPTIONS_GENERATE_ENUM
#include "qemu-options-wrapper.h"
};
+#define HAS_ARG 0x0001
+
+typedef struct QEMUOption {
+ const char *name;
+ int flags;
+ int index;
+ uint32_t arch_mask;
+} QEMUOption;
+
+extern const QEMUOption qemu_options[];
#endif
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 85bb0c8..0697cb9 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -6,6 +6,14 @@
#include "hw/qdev.h"
#include "qapi/error.h"
#include "qmp-commands.h"
+#include "qemu-options.h"
+
+const QEMUOption qemu_options[] = {
+ { "h", 0, QEMU_OPTION_h, QEMU_ARCH_ALL },
+#define QEMU_OPTIONS_GENERATE_OPTIONS
+#include "qemu-options-wrapper.h"
+ { NULL },
+};
static QemuOptsList *vm_config_groups[32];
static QemuOptsList *drive_config_groups[4];
@@ -143,18 +151,26 @@ CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
{
CommandLineOptionInfoList *conf_list = NULL, *entry;
CommandLineOptionInfo *info;
+ QemuOptsList *list;
int i;
- for (i = 0; vm_config_groups[i] != NULL; i++) {
- if (!has_option || !strcmp(option, vm_config_groups[i]->name)) {
+ for (i = 0; qemu_options[i].name; i++) {
+ if (!has_option || !strcmp(option, qemu_options[i].name)) {
info = g_malloc0(sizeof(*info));
- info->option = g_strdup(vm_config_groups[i]->name);
- if (!strcmp("drive", vm_config_groups[i]->name)) {
+ info->option = g_strdup(qemu_options[i].name);
+
+ if (!strcmp("drive", qemu_options[i].name)) {
info->parameters = get_drive_infolist();
} else {
- info->parameters =
- get_param_info(vm_config_groups[i]);
+ list = qemu_find_opts_err(qemu_options[i].name, NULL);
+ info->parameters = list ? get_param_info(list) : NULL;
}
+
+ if (!info->parameters) {
+ info->has_unspecified_parameters = true;
+ info->unspecified_parameters = qemu_options[i].flags & HAS_ARG;
+ }
+
entry = g_malloc0(sizeof(*entry));
entry->value = info;
entry->next = conf_list;
@@ -169,6 +185,8 @@ CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
return conf_list;
}
+#undef HAS_ARG
+
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp)
{
return find_list(vm_config_groups, group, errp);
diff --git a/vl.c b/vl.c
index a64dd0a..5bfcff9 100644
--- a/vl.c
+++ b/vl.c
@@ -111,7 +111,6 @@ int main(int argc, char **argv)
#include "trace/control.h"
#include "qemu/queue.h"
#include "sysemu/cpus.h"
-#include "sysemu/arch_init.h"
#include "qemu/osdep.h"
#include "ui/qemu-spice.h"
@@ -2080,22 +2079,6 @@ static void help(int exitcode)
exit(exitcode);
}
-#define HAS_ARG 0x0001
-
-typedef struct QEMUOption {
- const char *name;
- int flags;
- int index;
- uint32_t arch_mask;
-} QEMUOption;
-
-static const QEMUOption qemu_options[] = {
- { "h", 0, QEMU_OPTION_h, QEMU_ARCH_ALL },
-#define QEMU_OPTIONS_GENERATE_OPTIONS
-#include "qemu-options-wrapper.h"
- { NULL },
-};
-
static bool vga_available(void)
{
return object_class_by_name("VGA") || object_class_by_name("isa-vga");
@@ -2840,6 +2823,8 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
return popt;
}
+#undef HAS_ARG
+
static gpointer malloc_and_trace(gsize n_bytes)
{
void *ptr = malloc(n_bytes);
--
1.8.5.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options
2014-03-27 6:57 [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
` (2 preceding siblings ...)
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 3/3] query-command-line-options: query all the options in qemu-options.hx Amos Kong
@ 2014-03-27 7:16 ` Amos Kong
3 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2014-03-27 7:16 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, afaerber, libvirt-list, anthony, armbru
[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]
On Thu, Mar 27, 2014 at 02:57:00PM +0800, Amos Kong wrote:
> This patchset fixed some issues of query-command-line-options:
> * some new options that haven't argument can't be queried. (eg: -enable-fips)
> * some legacy options that have argument can't be queried. (eg: -vnc display)
>
> More discussion:
> http://marc.info/?l=qemu-devel&m=139081830416684&w=2
> https://www.redhat.com/archives/libvir-list/2014-March/msg00318.html
>
> V2: remove duplicate option tables, update schema (eric)
> V3: fix typo in commitlog and export qemu_options talbe (eric)
> V4: avoid the duplicate static table (eric)
> V5: rename new field, other fix (markus)
> V6: add implied-name (eric, markus)
>
> Thanks for your review!
Attached query output file, ([1] was additionally applied)
[1] https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05175.html
[PATCH 0/3] ABI change: change group name of option table to match with option name
----------------------
{
"name": "order",
"implied-name": true, <-- optional 'implied-name' was added
"type": "string" \-boot c,menu=on / -boot order=c,menu=on
}
],
"option": "boot" <---- "boot-opts" was fixed by [1]
},
-----------------------
{
"parameters": [
],
"option": "enable-fips", <-- lost enable-fips was queried
\ from qemu-options.hx
"unspecified-parameters": false <-- -enable-fips (bool option)
},
-----------------------
{
"parameters": [ <----- desc table is NULL
],
"option": "cdrom",
"unspecified-parameters": true <---- but it can accept argument
},
------------------------
See the detail in the attachment.
Thanks, Amos
> Amos Kong (3):
> qmp: rename query_option_descs() to get_param_info()
> query-command-line-options: expose implicit parameter name
> query-command-line-options: query all the options in qemu-options.hx
[-- Attachment #2: query-command-line-options.output --]
[-- Type: text/plain, Size: 48311 bytes --]
>>>> EXECUTE>>>> { 'execute': 'qmp_capabilities' }
>>>> EXECUTE>>>> { 'execute': 'query-command-line-options' }
{
"QMP": {
"version": {
"qemu": {
"micro": 90,
"minor": 7,
"major": 1
},
"package": ""
},
"capabilities": [
]
}
}
{
"return": {
}
}
{
"return": [
{
"parameters": [
{
"name": "timestamp",
"implied-name": false,
"type": "boolean"
}
],
"option": "msg"
},
{
"parameters": [
],
"option": "object",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "tdf",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-kvm-irqchip",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-kvm-pit",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-kvm-pit-reinjection",
"unspecified-paramet ers": false
},
{
"parameters": [
],
"option": "no-kvm",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "enable-fips",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "qtest-log",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "qtest",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "file",
"implied-name": false,
"type": "string"
},
{
"name": "events",
"implied-name": false,
"type": "string"
}
],
"optio n": "trace"
},
{
"parameters": [
],
"option": "no-user-config",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "nodefconfig",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "writeconfig",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "readconfig",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "enable",
"implied-name": true,
"type": "boolean"
}
],
"option": "sandbox"
},
{
"parameters": [
],
"option": "old-param",
"unspecified -parameters": false
},
{
"parameters": [
],
"option": "semihosting",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "prom-env",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "runas",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "chroot",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "nodefaults",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "incoming",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "tb-size" ,
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "show-cursor",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "virtioconsole",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "echr",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "watchdog-action",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "watchdog",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "icount",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "driftfix",
"implied-name": false,
"type": "string"
},
{
"name": "clock",
"implied-name": false,
"type": "string"
},
{
"name": "base",
"implied-name": false,
"type": "string"
}
],
"option": "rtc"
},
{
"parameters": [
],
"option": "startdate",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "localtime",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "clock",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "romfile",
"implied-name": true,
"type": "string"
},
{
"name": "bootindex",
"implied-name": false,
"type": "number"
}
],
"option": "option-rom"
},
{
"parameters": [
],
"option": "daemonize",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "loadvm",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "no-shutdown",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-reboot",
"unspecified-parameters": false
},
{
"par ameters": [
],
"option": "xen-attach",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "xen-create",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "xen-domid",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "enable-kvm",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "bios",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "L",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "D",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "d",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "s",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "gdb",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "mlock",
"implied-name": false,
"type": "boolean"
}
],
"option": "realtime"
},
{
"parameters": [
],
"option": "S",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "singlestep",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "pidfile",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "debugcon",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "pretty",
"implied-name": false,
"type": "boolean"
},
{
"name": "default",
"implied-name": false,
"type": "boolean"
},
{
"name": "chardev",
"implied-name": true,
"type": "string"
},
{
"name": "mode",
"implied-name": false,
"type": "string"
}
],
"option": "mon"
},
{
"parameters": [
],
"option": "qmp",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "monitor",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "parallel",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "serial",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "dtb",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "initrd",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "append",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "kernel",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "bt",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "initiator-name",
"implied-name": false,
"help": "Initiator iqn name to use when connecting",
"type": "string"
},
{
"name": "header-digest",
"implied-name": false,
"help": "HeaderDigest setting. {CRC32C|CRC32C-NONE|NONE-CRC32C|NONE}",
"type": "string"
},
{
"name": "password",
"implied-name": false,
"help": "password for CHAP authentication to target",
"type": "string"
},
{
"name": "user",
"implied-name": false,
"help": "username for CHAP authentication to target",
"type": "string"
}
],
"option": "iscsi"
},
{
"parameters": [
{
"name": "chardev",
"implied-name": false,
"type": "string"
},
{
"name": "size",
"implied-name": false,
"type": "size"
},
{
"name": "debug",
"implied-name": false,
"type": "number"
},
{
"name": "name",
"implied-name": false,
"type": "string"
},
{
"name": "signal",
"implied-name": false,
"type": "boolean"
},
{
"name": "mux",
"implied-name": false,
"type": "boolean"
},
{
"name": "rows",
"implied-name": false,
"type": "number"
},
{
"name": "cols",
"implied-name": false,
"type": "number"
},
{
"name": "height",
"implied-name": false,
"type": "number"
},
{
"name": "width",
"implied-name": false,
"type": "number"
},
{
"n ame": "telnet",
"implied-name": false,
"type": "boolean"
},
{
"name": "delay",
"implied-name": false,
"type": "boolean"
},
{
"name": "server",
"implied-name": false,
"type": "boolean"
},
{
"name": "wait",
"implied-name": false,
"type": "boolean"
},
{
"name": "ipv6",
"implied-name": false,
"type": "boolean"
},
{
"name": "ipv4",
"implied-name": false,
"type": "boolean"
},
{
"name": "to",
"implied-name ": false,
"type": "number"
},
{
"name": "localport",
"implied-name": false,
"type": "string"
},
{
"name": "localaddr",
"implied-name": false,
"type": "string"
},
{
"name": "port",
"implied-name": false,
"type": "string"
},
{
"name": "host",
"implied-name": false,
"type": "string"
},
{
"name": "path",
"implied-name": false,
"type": "string"
},
{
"name": "backend",
"implied-name": true,
"type": "strin g"
}
],
"option": "chardev"
},
{
"parameters": [
],
"option": "netdev",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "net",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "smb",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "redir",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "bootp",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "tftp",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "smbios",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "acpitable",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "no-hpet",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-acpi",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-fd-bootchk",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "rtc-td-hack",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "win2k-hack",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "vnc",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "g",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "full-screen",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "vga",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "rotate",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "portrait",
"unspecified-parameters": false
},
{
"parameters": [
{
"name": "seamless-migration",
"implied-name": false,
"type": "boolean"
},
{
"name": "playback-compression",
"implied-name": false,
"type": "boolean"
},
{
"name": "agent-mouse",
"implied-name": false,
"type": "boolean"
},
{
"name": "streaming-video",
"implied-name": false,
"type": "string"
},
{
"name": "zlib-glz-wan-compression",
"implied-name": false,
"type": "string"
},
{
"name": "jpeg-wan-compression",
"implied-name": false,
"type": "string"
},
{
"name": "image-compression",
" implied-name": false,
"type": "string"
},
{
"name": "plaintext-channel",
"implied-name": false,
"type": "string"
},
{
"name": "tls-channel",
"implied-name": false,
"type": "string"
},
{
"name": "tls-ciphers",
"implied-name": false,
"type": "string"
},
{
"name": "x509-dh-key-file",
"implied-name": false,
"type": "string"
},
{
"name": "x509-cacert-file",
"implied-name": false,
"type": "string"
},
{
"name": "x509-cert-file",
"implied-name": false,
"type": "string"
},
{
"name": "x509-key-password",
"implied-name": false,
"type": "string"
},
{
"name": "x509-key-file",
"implied-name": false,
"type": "string"
},
{
"name": "x509-dir",
"implied-name": false,
"type": "string"
},
{
"name": "sasl",
"implied-name": false,
"type": "boolean"
},
{
"name": "disable-agent-file-xfer",
"implied-name": false,
"type": "boolean"
},
{
"name": "disable-copy-paste",
"implied-name": false,
"type": "boolean"
},
{
"name": "disable-ticketing",
"implied-name": false,
"type": "boolean"
},
{
"name": "password",
"implied-name": false,
"type": "string"
},
{
"name": "ipv6",
"implied-name": false,
"type": "boolean"
},
{
"name": "ipv4",
"implied-name": false,
"type": "boolean"
},
{
"name": "addr",
"implied-name": false,
"type": "string"
},
{
"name": "tls-port",
"implied-name": false,
"type": "number"
},
{
"name": "port",
"implied-name": false,
"type": "number"
}
],
"option": "spice"
},
{
"parameters": [
],
"option": "sdl",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-quit",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": " ctrl-grab",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "alt-grab",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "no-frame",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "curses",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "nographic",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "display",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "usbdevice",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "usb",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "virtfs_synth",
"unspecified-parameters": false
},
{
"parameters": [
{
"name": "sock_fd",
"implied-name": false,
"type": "number"
},
{
"name": "socket",
"implied-name": false,
"type": "string"
},
{
"name": "readonly",
"implied-name": false,
"type": "boolean"
},
{
"name": "writeout",
"implied-name": false,
"type": "string"
},
{
"name": "security_model",
"implied-name": false,
"type": "string"
},
{
"name": "mount_tag",
"implied-name": false,
"type": "string"
},
{
"name": "path",
"implied-name": false,
"type": "string"
},
{
"name": "fsdriver",
"implied-name": true,
"type": "string"
}
],
"option": "virtfs"
},
{
"parameters": [
{
"name": "sock_fd",
"implied-name": false,
"type": "number"
},
{
"name": "socket",
"implied-name": false,
"type": "string"
},
{
"name": "readonly",
"implied-name": false,
"type": "boolean"
},
{
"name": "writeout",
"implied-name": false,
"type": "string"
},
{
"name": "security_model",
"implied-name": false,
"type": "string"
},
{
"name": "path",
"implied-name": false,
"type": "string"
},
{
"name": "fsdriver",
"implied-name": true,
"type": "string"
}
],
"option": "fsdev"
},
{
"parameters": [
],
"option": "hdachs",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "snapshot",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "pflash",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "sd",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "mtdblock",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "copy-on-read",
"implied-name": false,
"help": "copy read data from backing file into image file",
"type": "boolean"
},
{
"name": "werror",
"implied-name": false,
"help": "write error action",
"type": "string"
},
{
"name": "rerror",
"implied-name": false,
"help": "read error action",
"type": "string"
},
{
"name": "read-only",
"implied-name": false,
"help": "open drive file as read-only",
"type": "boolean"
},
{
"name": "file",
"implied-name": false,
"help": "file name",
"type": "string"
},
{
"name": "addr",
"implied-name": false,
"help": "pci address (virtio only)",
"type": "string"
},
{
"name": "boot",
"im plied-name": false,
"help": "(deprecated, ignored)",
"type": "boolean"
},
{
"name": "trans",
"implied-name": false,
"help": "chs translation (auto, lba, none)",
"type": "string"
},
{
"name": "secs",
"implied-name": false,
"help": "number of sectors (ide disk geometry)",
"type": "number"
},
{
"name": "heads",
"implied-name": false,
"help": "number of heads (ide disk geometry)",
"type": "number"
},
{
"name": "cyls",
"implied-name": false,
"help": "number of cylinders (ide disk geometry)",
"type": "number"
},
{
"name": "if",
"implied-name": false,
"help": "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)",
"type": "string"
},
{
"name": "media",
"implied-name": false,
"help": "media type (disk, cdrom)",
"type": "string"
},
{
"name": "index",
"implied-name": false,
"help": "index number",
"type": "number"
},
{
"name": "unit",
"implied-name": false,
"help": "unit number (i.e. lun for scsi)",
"type": "number"
},
{
"name": "bus",
"implied -name": false,
"help": "bus number",
"type": "number"
},
{
"name": "throttling.iops-size",
"implied-name": false,
"help": "when limiting by iops max size of an I/O in bytes",
"type": "number"
},
{
"name": "throttling.bps-write-max",
"implied-name": false,
"help": "total bytes write burst",
"type": "number"
},
{
"name": "throttling.bps-read-max",
"implied-name": false,
"help": "total bytes read burst",
"type": "number"
},
{
"name": "throttling.bps-total-max",
"implied-name": false,
"help": "total bytes burst",
"type": "number"
},
{
"name": "throttling.iops-write-max",
"implied-name": false,
"help": "I/O operations write burst",
"type": "number"
},
{
"name": "throttling.iops-read-max",
"implied-name": false,
"help": "I/O operations read burst",
"type": "number"
},
{
"name": "throttling.iops-total-max",
"implied-name": false,
"help": "I/O operations burst",
"type": "number"
},
{
"name": "throttling.bps-write",
"implied-name": false,
"help": "limit write bytes per second",
"type": "number"
},
{
"name": "throttling.bps-read",
"implied-name": false,
"help": "limit read bytes per second",
"type": "number"
},
{
"name": "throttling.bps-total",
"implied-name": false,
"help": "limit total bytes per second",
"type": "number"
},
{
"name": "throttling.iops-write",
"implied-name": false,
"help": "limit write operations per second",
"type": "number"
},
{
"name": "throttling.iops-read",
"implied-name": false,
"help": "limit read operations per second",
"type": "number"
},
{
"name": "throttling.iops-t otal",
"implied-name": false,
"help": "limit total I/O operations per second",
"type": "number"
},
{
"name": "werror",
"implied-name": false,
"help": "write error action",
"type": "string"
},
{
"name": "serial",
"implied-name": false,
"help": "disk serial number",
"type": "string"
},
{
"name": "format",
"implied-name": false,
"help": "disk format (raw, qcow2, ...)",
"type": "string"
},
{
"name": "aio",
"implied-name": false,
"help": "host AIO implementation (threads, native)",
"type": "string"
},
{
"name": "cache.no-flush",
"implied-name": false,
"help": "ignore any flush requests for the device",
"type": "boolean"
},
{
"name": "cache.direct",
"implied-name": false,
"help": "enables use of O_DIRECT (bypass the host page cache)",
"type": "boolean"
},
{
"name": "cache.writeback",
"implied-name": false,
"help": "enables writeback mode for any caches",
"type": "boolean"
},
{
"name": "discard",
"implied-name": false,
"help": "discard operation (ignore/off, unmap/on)",
"type": "string"
},
{
"name": "snapshot",
"implied-name": false,
"help": "enable/disable snapshot mode",
"type": "boolean"
}
],
"option": "drive"
},
{
"parameters": [
],
"option": "cdrom",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "hdd",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "hdc",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "hdb",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "hda",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "fdb",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "fda",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "uuid",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "debug-threads",
"implied-name": false,
"help": "When enabled, name the individual threads; defaults off.\nNOTE: The thread names are for debugging and not a\nstable API.",
"type": "boolean"
},
{
"name": "process",
"implied-name": false,
"help": "Sets the name of the QEMU process, as shown in top etc",
"type": "string"
},
{
"name": "guest",
"implied-name": true,
"help": "Sets the name of the guest.\nThis name will be displayed in the SDL window caption.\nThe name will also be used for the VNC server",
"type": "string"
}
],
"option": "name"
},
{
"parameters": [
],
"option": "device",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "balloon",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "soundhw",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "audio-help",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "k",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "mem-prealloc",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "mem-path",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "m",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "strict",
"implied-name": false,
"type": "boolean"
},
{
"name": "reboot-timeout",
"implied-name": false,
"type": "string"
},
{
"name": "splash-time",
"implied-name": false,
"type": "string"
},
{
"name": "splash",
"implied-name": false,
"type": "string"
},
{
"name": "menu",
"implied-name": false,
"type": "boolean"
},
{
"name": "once",
"implied-name": false,
"type": "string"
},
{
"name": "order",
"implied-name": true,
"type": "string"
}
],
"option": "boot"
},
{
"parameters": [
{
"name": "value",
"implied-name": false,
"type": "string"
},
{
"name": "property",
"implied-name": false,
"type": "string"
},
{
"name": "driver",
"implied-name": false,
"type": "string"
}
],
"option": "global"
},
{
"parameters": [
],
"option": "set",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "opaque",
"implied-name": false,
"help": "free-form string used to describe fd",
"type": "string"
},
{
"name": "set",
"implied-name": false,
"help": "ID of the fd set to add fd to",
"type": "number"
},
{
"name": "fd",
"implied-name": false,
"help": "file descriptor of which a duplicate is added to fd set",
"type": "number"
}
],
"option": "add-fd"
},
{
"parameters": [
],
"option": "numa",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "maxcpus",
"implied-name": false,
"type": "number"
},
{
"name": "threads",
"implied-name": false,
"type": "number"
},
{
"name": "cores",
"implied-name": false,
"type": "number"
},
{
"name": "socke ts",
"implied-name": false,
"type": "number"
},
{
"name": "cpus",
"implied-name": true,
"type": "number"
}
],
"option": "smp"
},
{
"parameters": [
],
"option": "cpu",
"unspecified-parameters": true
},
{
"parameters": [
],
"option": "M",
"unspecified-parameters": true
},
{
"parameters": [
{
"name": "kvm-type",
"implied-name": false,
"help": "Specifies the KVM virtualization mode (HV, PR)",
"type": "string"
},
{
"name": "firmware",
"implied-name": false,
"help": "firmware image",
"type": "string"
},
{
"name": "usb",
"implied-name": false,
"help": "Set on/off to enable/disable usb",
"type": "boolean"
},
{
"name": "mem-merge",
"implied-name": false,
"help": "enable/disable memory merge support",
"type": "boolean"
},
{
"name": "dump-guest-core",
"implied-name": false,
"help": "Include guest memory in a core dump",
"type": "boolean"
},
{
"name": "dt_compatible",
"implied-name": false,
"help": "Overrides the \"compatible\" property of the dt root node",
"type" : "string"
},
{
"name": "phandle_start",
"implied-name": false,
"help": "The first phandle ID we may generate dynamically",
"type": "number"
},
{
"name": "dumpdtb",
"implied-name": false,
"help": "Dump current dtb to a file and quit",
"type": "string"
},
{
"name": "dtb",
"implied-name": false,
"help": "Linux kernel device tree file",
"type": "string"
},
{
"name": "append",
"implied-name": false,
"help": "Linux kernel command line",
"type": "string"
},
{
"name": "initrd",
"implied-name": false,
"help": "Linux initial ramdisk file",
"type": "string"
},
{
"name": "kernel",
"implied-name": false,
"help": "Linux kernel image file",
"type": "string"
},
{
"name": "kvm_shadow_mem",
"implied-name": false,
"help": "KVM shadow MMU size",
"type": "size"
},
{
"name": "kernel_irqchip",
"implied-name": false,
"help": "use KVM in-kernel irqchip",
"type": "boolean"
},
{
"name": "accel",
"implied-name": false,
"help": "accelerator list",
"type": "string"
},
{
"name": "type",
"implied-name": true,
"help": "emulated machine",
"type": "string"
}
],
"option": "machine"
},
{
"parameters": [
],
"option": "version",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "help",
"unspecified-parameters": false
},
{
"parameters": [
],
"option": "h",
"unspecified-parameters": false
}
]
}
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-27 7:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 6:57 [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 1/3] qmp: rename query_option_descs() to get_param_info() Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 2/3] query-command-line-options: expose implicit parameter name Amos Kong
2014-03-27 6:57 ` [Qemu-devel] [PATCH v6 3/3] query-command-line-options: query all the options in qemu-options.hx Amos Kong
2014-03-27 7:16 ` [Qemu-devel] [PATCH v6 0/3] fix query-command-line-options Amos Kong
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).