qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] util/qemu-config: Fix "query-command-line-options" to provid


From: Thomas Huth
Subject: Re: [PATCH] util/qemu-config: Fix "query-command-line-options" to provide the right values
Date: Fri, 11 Nov 2022 11:23:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 09/11/2022 09.44, Thomas Huth wrote:
The "query-command-line-options" command uses a hand-crafted list
of options that should be returned for the "machine" parameter.
This is pretty much out of sync with reality, for example settings
like "kvm_shadow_mem" or "accel" are not parameters for the machine
anymore. Also, there is no distinction between the targets here, so
e.g. the s390x-specific values like "loadparm" in this list also
show up with the other targets like x86_64.

Let's fix this now by geting rid of the hand-crafted list and by
querying the properties of the machine class instead to assemble
the list.

Fixes: 0a7cf217d8 ("fix regression of qmp_query_command_line_options")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
[...]
+static CommandLineParameterInfoList *query_machine_properties(void)
+{
+    CommandLineParameterInfoList *param_list = NULL;
+    CommandLineParameterInfo *info;
+    ObjectPropertyIterator iter;
+    ObjectProperty *prop;
+    ObjectClass *oc;
+
+    oc = object_get_class(container_get(object_get_root(), "/machine"));
+    assert(oc);

Hmmm, thinking about this again, it likely doesn't work that well either. libvirt uses the "none" machine to query the things that QEMU provides, so the properties of the individual machines won't show up this way... I guess I have to loop over all machine classes to collect all properties from all machines or something like that...?

 Thomas




reply via email to

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