[Top][All Lists]

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

Re: [PATCH 15/25] vl: plumb keyval-based options into -set and -readconf

From: Markus Armbruster
Subject: Re: [PATCH 15/25] vl: plumb keyval-based options into -set and -readconfig
Date: Mon, 25 Jan 2021 12:48:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Paolo Bonzini <pbonzini@redhat.com> writes:

> Add generic machinery to support parsing command line options with
> keyval in -set and -readconfig, choosing between QDict and
> QemuOpts as the underlying data structure.
> The keyval_merge function is slightly heavyweight as a way to
> do qemu_set_option for QDict-based options, but it will be put
> to further use later to merge entire -readconfig sections together
> with their command-line equivalents.
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Watch this:

    $ cat test.cfg
      accel = "kvm"
      usb = "on"
    $ qemu-system-x86_64 -S -display none -readconfig test.cfg
    Aborted (core dumped)


    #0  0x00007ffff52f19e5 in raise () at /lib64/libc.so.6
    #1  0x00007ffff52da895 in abort () at /lib64/libc.so.6
    #2  0x0000555555c44a77 in qemu_record_config_group
        (group=0x7fffffffd1b0 "machine", dict=0x5555565fb740, 
errp=0x5555564ffca0 <error_fatal>) at ../softmmu/vl.c:2103
    #3  0x0000555555c44bd8 in qemu_parse_config_group
        (group=0x7fffffffd1b0 "machine", qdict=0x5555565f9640, 
opaque=0x5555564ff9e0 <vm_config_groups>, errp=0x5555564ffca0 <error_fatal>) at 
    #4  0x0000555555eda3e6 in qemu_config_foreach
        (fp=0x5555565f3e00, cb=0x555555c44af5 <qemu_parse_config_group>, 
opaque=0x5555564ff9e0 <vm_config_groups>, fname=0x7fffffffe0dd "test.cfg", 
errp=0x5555564ffca0 <error_fatal>) at ../util/qemu-config.c:378
    #5  0x0000555555eda5d5 in qemu_read_config_file
        (filename=0x7fffffffe0dd "test.cfg", cb=0x555555c44af5 
<qemu_parse_config_group>, errp=0x5555564ffca0 <error_fatal>) at 
    #6  0x0000555555c47d3f in qemu_init
        (argc=6, argv=0x7fffffffdcc8, envp=0x7fffffffdd00) at 
    #7  0x00005555558234e1 in main
        (argc=6, argv=0x7fffffffdcc8, envp=0x7fffffffdd00) at 

Similar result for

      size = "1024"


    [chardev "mon0"]
      backend = "stdio"

I didn't look for more.

reply via email to

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