include/block/qdict.h | 2 - include/qapi/qmp/qdict.h | 3 ++ include/qemu/config-file.h | 7 ++- softmmu/vl.c | 104 ++++++++++++++++++++++++++----------- util/qemu-config.c | 91 +++++++++++++++++++++----------- 5 files changed, 145 insertions(+), 62 deletions(-)
LXD developers have reported that [object] stanzas have stopped working in configuration files. The problem is that QEMU 6.0 switched the creation of objects from qemu_opts_foreach to a bespoke QTAILQ, in preparation for supporting JSON syntax in -object. Entries from the configuration file however do not go through object_option_parse, and are thus lost. Of the many fixes that are possible, I chose one that is slightly more invasive but more consistent with the plans for keyval-ification of options such as -M and -accel. -set was also broken by the same change, but for simplicity I chose not to add it back yet. However, this series will report the breakage instead of failing silently. The first two patches of this series are thus a reduced version of https://patchew.org/QEMU/20210513162901.1310239-1-pbonzini@redhat.com/ ([PATCH 00/14] vl: compound properties for machines and accelerators), with the -set infrastructure removed. The third is very simple and uses the newly-provided hooks to parse objects from configuration files. Paolo Bonzini (3): qemu-config: parse configuration files to a QDict vl: plumb keyval-based options into -readconfig vl: plug -object back into -readconfig include/block/qdict.h | 2 - include/qapi/qmp/qdict.h | 3 ++ include/qemu/config-file.h | 7 ++- softmmu/vl.c | 104 ++++++++++++++++++++++++++----------- util/qemu-config.c | 91 +++++++++++++++++++++----------- 5 files changed, 145 insertions(+), 62 deletions(-) -- 2.27.0
Am 18.05.2021 um 17:40 hat Paolo Bonzini geschrieben: > LXD developers have reported that [object] stanzas have stopped > working in configuration files. > > The problem is that QEMU 6.0 switched the creation of objects from > qemu_opts_foreach to a bespoke QTAILQ, in preparation for supporting > JSON syntax in -object. Entries from the configuration file however > do not go through object_option_parse, and are thus lost. Of the many > fixes that are possible, I chose one that is slightly more invasive but > more consistent with the plans for keyval-ification of options such as > -M and -accel. > > -set was also broken by the same change, but for simplicity I chose > not to add it back yet. However, this series will report the > breakage instead of failing silently. > > The first two patches of this series are thus a reduced version of > https://patchew.org/QEMU/20210513162901.1310239-1-pbonzini@redhat.com/ > ([PATCH 00/14] vl: compound properties for machines and accelerators), > with the -set infrastructure removed. The third is very simple and > uses the newly-provided hooks to parse objects from configuration files. Looks like this is Based-on: <20210518131542.2941207-1-pbonzini@redhat.com> Kevin
On 19/05/21 15:58, Kevin Wolf wrote: > Am 18.05.2021 um 17:40 hat Paolo Bonzini geschrieben: >> LXD developers have reported that [object] stanzas have stopped >> working in configuration files. >> >> The problem is that QEMU 6.0 switched the creation of objects from >> qemu_opts_foreach to a bespoke QTAILQ, in preparation for supporting >> JSON syntax in -object. Entries from the configuration file however >> do not go through object_option_parse, and are thus lost. Of the many >> fixes that are possible, I chose one that is slightly more invasive but >> more consistent with the plans for keyval-ification of options such as >> -M and -accel. >> >> -set was also broken by the same change, but for simplicity I chose >> not to add it back yet. However, this series will report the >> breakage instead of failing silently. >> >> The first two patches of this series are thus a reduced version of >> https://patchew.org/QEMU/20210513162901.1310239-1-pbonzini@redhat.com/ >> ([PATCH 00/14] vl: compound properties for machines and accelerators), >> with the -set infrastructure removed. The third is very simple and >> uses the newly-provided hooks to parse objects from configuration files. > > Looks like this is > Based-on: <20210518131542.2941207-1-pbonzini@redhat.com> Just context, but yes it is. Paolo
Patchew URL: https://patchew.org/QEMU/20210518154014.2999326-1-pbonzini@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210518154014.2999326-1-pbonzini@redhat.com Subject: [PATCH 0/3] vl: add -object support back into -readconfig === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20210518154014.2999326-1-pbonzini@redhat.com -> patchew/20210518154014.2999326-1-pbonzini@redhat.com - [tag update] patchew/20210519104433.16870-1-jcmvbkbc@gmail.com -> patchew/20210519104433.16870-1-jcmvbkbc@gmail.com - [tag update] patchew/20210519113528.12474-1-davoronetskiy@gmail.com -> patchew/20210519113528.12474-1-davoronetskiy@gmail.com Switched to a new branch 'test' 0124ce7 vl: plug -object back into -readconfig e0cb857 vl: plumb keyval-based options into -readconfig 2b01956 qemu-config: parse configuration files to a QDict === OUTPUT BEGIN === 1/3 Checking commit 2b0195631f20 (qemu-config: parse configuration files to a QDict) WARNING: line over 80 characters #35: FILE: include/qemu/config-file.h:4: +typedef void QEMUConfigCB(const char *group, QDict *qdict, void *opaque, Error **errp); WARNING: line over 80 characters #46: FILE: include/qemu/config-file.h:20: +void qemu_config_do_parse(const char *group, QDict *qdict, void *opaque, Error **errp); WARNING: line over 80 characters #70: FILE: softmmu/vl.c:3389: + qemu_read_config_file(optarg, qemu_config_do_parse, &error_fatal); WARNING: line over 80 characters #178: FILE: util/qemu-config.c:428: +void qemu_config_do_parse(const char *group, QDict *qdict, void *opaque, Error **errp) WARNING: line over 80 characters #200: FILE: util/qemu-config.c:450: +int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname, Error **errp) total: 0 errors, 5 warnings, 171 lines checked Patch 1/3 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 2/3 Checking commit e0cb8571d7a2 (vl: plumb keyval-based options into -readconfig) ERROR: line over 90 characters #73: FILE: softmmu/vl.c:2127: +static void qemu_record_config_group(const char *group, QDict *dict, bool from_json, Error **errp) WARNING: line over 80 characters #97: FILE: softmmu/vl.c:2151: + error_setg(errp, "Lists cannot be at top level of a configuration section"); WARNING: line over 80 characters #182: FILE: softmmu/vl.c:3423: + qemu_read_config_file(optarg, qemu_parse_config_group, &error_fatal); total: 1 errors, 2 warnings, 143 lines checked Patch 2/3 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 3/3 Checking commit 0124ce72a634 (vl: plug -object back into -readconfig) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20210518154014.2999326-1-pbonzini@redhat.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
© 2016 - 2024 Red Hat, Inc.