Hi, I didn't start out intending to write this series, but I end up here trying to resolve an issue in the gtk UI.
This series does some dramatic refactoring to -readconfig essentially throwing away the existing (trivial) implementation and replacing it with glib's GKeyFile support. It also plumbs the existing command line options through QemuOpts via a special 'system' section. This means that any command line option can be specified via readconfig and that the combination of -nodefconfig and -writeconfig should give you exactly the same guest in a repeatable fashion. Finally, this series exposes a new -query-capabilities option which dumps the QemuOpts schema's via JSON to standard output (along with some other goodies like the version info and supported QMP commands). The purpose of this series is to change the way management tools (esp libvirt) interact with QEMU to determine capabilities. Instead of help parsing, libvirt should use -query-capabilities to figure out which options are supported and when new suboptions are available. I would like to push this series into 1.1 and deprecate the help output. My plan would be to radically change the help output for 1.2 giving libvirt about a release cycle to update the parsing of capabilities. To ease the transition, the help text is available via -query-capabilities but will be subject to change in the future.