qemu-e2k/scripts
Markus Armbruster 1f214ee1b8 qapi: Do not expose "allow-preconfig" in query-qmp-schema
According to commit 047f7038f5, option --preconfig

    [...] allows pausing QEMU in the new RUN_STATE_PRECONFIG state,
    allowing the configuration of QEMU from QMP before the machine
    jumps into board initialization code of machine_run_board_init()

    The intent is to allow management to query machine state and
    additionally configure it using previous query results within one
    QEMU instance (i.e. eliminate the need to start QEMU twice, 1st to
    query board specific parameters and 2nd for actual VM start using
    query results for additional parameters).

The implementation is a bit of a hack: it splices in an additional
main loop before machine creation, in special runstate preconfig.  New
command exit-preconfig exits that main loop.  QEMU continues
initializing, creates the machine, and runs the good old main loop.
The replacement of the main loop is transparent to monitors.

Sadly, some commands expect initialization to be complete.  Running
them in --preconfig's main loop violates their preconditions.  Since
we don't really know which commands are safe, we use a whitelist.
This drags the concept of run state into the QMP core.

The whitelist is done as a command flag in the QAPI schema (commit
d6fe3d02e9).  Drags the concept of run state further into the QAPI
language.

The command flag is exposed in query-qmp-schema (also commit
d6fe3d02e9).  This makes it ABI.

I consider the whole thing an offensively ugly hack, but sometimes an
ugly hack is the best we can do to solve a problem people have.

The need described by the commit message quote above is genuine.  The
proper solution would be a main loop that permits complete
configuration via QMP.  This is out of reach, thus the hack.

However, even though the need is genuine, it isn't urgent: libvirt is
not going to use this anytime soon.  Baking a hack into ABI before it
has any users is a bad idea.

This commit reverts the parts of commit d6fe3d02e9 that affect ABI
via query-qmp-schema.  The commit did the following:

(1) Add command flag 'allow-preconfig' to the QAPI schema language

(2) Pass it to code generators

(3) Have the commands.py code generator pass it to the command
    registry (so commit 047f7038f5 can use it as whitelist)

(4) Add 'allow-preconfig' to SchemaInfoCommand (neglecting to update
    qapi-code-gen.txt section "Client JSON Protocol introspection")

(5) Set 'allow-preconfig': true for commands qmp_capabilities,
    query-commands, query-command-line-options, query-status

Revert exactly (4), plus a bit of documentation added to
qemu-tech.info in commit 047f7038f5.

Shrinks query-qmp-schema's output from 126.5KiB to 121.8KiB for me.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180705091402.26244-2-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
[Straightforward conflict with commit d626b6c1ae resolved]
2018-07-16 15:35:57 +02:00
..
coccinelle
kvm
modules
qapi qapi: Do not expose "allow-preconfig" in query-qmp-schema 2018-07-16 15:35:57 +02:00
qemu-guest-agent
qemugdb
qmp Partially revert "python: futurize -f libfuturize.fixes.fix_absolute_import" 2018-06-22 15:45:42 -03:00
tracetool trace: Fix format string for the struct timeval members casted to size_t 2018-06-29 15:04:18 +01:00
travis travis: add gcovr summary for GCOV build 2018-07-05 15:59:41 +01:00
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py
analyze-inclusions
analyze-migration.py
archive-source.sh
check-qerror.sh
checkpatch.pl checkpatch: handle token pasting better 2018-07-06 18:39:19 +02:00
clean-header-guards.pl
clean-includes
cleanup-trace-events.pl
cocci-macro-file.h
coverity-model.c coverity-model: Fix replay_get_byte() 2018-07-05 15:09:52 +02:00
create_config Revert "Makefile: Rename TARGET_DIRS to TARGET_LIST" 2018-07-05 15:59:41 +01:00
decodetree.py
device-crash-test
disas-objdump.pl
dump-guest-memory.py
extract-vsssdk-headers
feature_to_c.sh
get_maintainer.pl
git-submodule.sh
git.orderfile
gtester-cat
hxtool
make_device_config.sh
make-release
qapi-gen.py
qemu-binfmt-conf.sh Some strace cleanups 2018-07-04 22:38:10 +01:00
qemu-gdb.py
qemu.py scripts/qemu.py: introduce set_console() method 2018-06-15 16:10:11 -03:00
qtest.py
refresh-pxe-roms.sh
replay-dump.py
shaderinclude.pl
show-fixed-bugs.sh
signrom.py
simpletrace.py simpletrace: Convert name from mapping record to str 2018-06-29 15:04:18 +01:00
switch-timer-api
texi2pod.pl
tracetool.py
update-linux-headers.sh
vmstate-static-checker.py