query-command-line-options derives the parameters of -machine from machine type class properties. The code maps property types "bool", "OnOffAuto", "int", and "size" to CommandLineParameterTypes "bool", "number", and "size". Any other property type becomes "string". This includes all the other integer types. The obvious fix would be code to map all the integer types to "number". But there's an easier one: all the integer types have the same masked name "int". So use that. This fixes the type of several parameters of -machine: * qemu-system-aarch64 and -arm: virtio-mmio-transports * qemu-system-hexagon: subsystem-base * qemu-system-x86_64 and -i386: pci-mmio-high-base pci-mmio-size pci-intx-irq-base pci-ecam-size pci-ecam-base pci-mmio-high-size ram-low-size ram-low-base pci-mmio-base ram-high-size ram-high-base bus-lock-ratelimit * qemu-system-riscv64 and -riscv32: signature-granularity * qemu-system-risc64: clint-timebase-frequency Signed-off-by: Markus Armbruster <armbru@redhat.com> --- util/qemu-config-qmp-cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-config-qmp-cmds.c b/util/qemu-config-qmp-cmds.c index e0038628f97..f1a6cde56bd 100644 --- a/util/qemu-config-qmp-cmds.c +++ b/util/qemu-config-qmp-cmds.c @@ -106,10 +106,10 @@ static CommandLineParameterInfo *objprop_to_cmdline_prop(ObjectProperty *prop) if (g_str_equal(qt->name, "bool") || g_str_equal(qt->name, "OnOffAuto")) { info->type = COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; - } else if (g_str_equal(qt->name, "int")) { - info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; } else if (g_str_equal(qt->name, "size")) { info->type = COMMAND_LINE_PARAMETER_TYPE_SIZE; + } else if (g_str_equal(qt->masked_name, "int")) { + info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; } else { info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; } -- 2.55.0