qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1f214e: qapi: Do not expose "allow-preconfig"


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 1f214e: qapi: Do not expose "allow-preconfig" in query-qmp...
Date: Mon, 16 Jul 2018 09:18:13 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1f214ee1b83afd10fd5e1b63f4ecc03f9a8115c4
      
https://github.com/qemu/qemu/commit/1f214ee1b83afd10fd5e1b63f4ecc03f9a8115c4
  Author: Markus Armbruster <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M qapi/introspect.json
    M qemu-tech.texi
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi: Do not expose "allow-preconfig" in query-qmp-schema

According to commit 047f7038f58, 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
d6fe3d02e9a).  Drags the concept of run state further into the QAPI
language.

The command flag is exposed in query-qmp-schema (also commit
d6fe3d02e9a).  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 d6fe3d02e9a 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 047f7038f58 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 047f7038f58.

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

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Eduardo Habkost <address@hidden>
Acked-by: Igor Mammedov <address@hidden>
[Straightforward conflict with commit d626b6c1ae7 resolved]


  Commit: 361ac948a5c960ce7a093cec1744bff0d5af3dec
      
https://github.com/qemu/qemu/commit/361ac948a5c960ce7a093cec1744bff0d5af3dec
  Author: Markus Armbruster <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hmp.c
    M qapi/misc.json
    M qemu-options.hx
    M qemu-tech.texi
    M qmp.c
    M tests/numa-test.c
    M tests/qmp-test.c

  Log Message:
  -----------
  cli qmp: Mark --preconfig, exit-preconfig experimental

Committing to the current --preconfig / exit-preconfig interface
before it has seen any use is premature.  Mark both as experimental,
the former in documentation, the latter by renaming it to
x-exit-preconfig.

See the previous commit for more detailed rationale.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Eduardo Habkost <address@hidden>
Acked-by: Igor Mammedov <address@hidden>
[Straightforward conflict with commit 514337c142f resolved]


  Commit: 44c67847e32c91a6071fb0440c357b9489f08bc6
      
https://github.com/qemu/qemu/commit/44c67847e32c91a6071fb0440c357b9489f08bc6
  Author: Markus Armbruster <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    A qemu-deprecated.texi
    M qemu-doc.texi

  Log Message:
  -----------
  qemu-doc: Move appendix "Deprecated features" to its own file

Consumers of QEMU need to track feature deprecation.  Keeping
deprecation documentation in its own file helps in two small ways:

* You can track changes the easy and obvious way, with git-log.
  Before, you had to resort to more complex gittery like "git-log
  --oneline -L '/@node Deprecated features/,/@node Supported build
  platforms/:qemu-doc.texi'"

* It lets us use MAINTAINERS to copy interested parties on deprecation
  patches, so they can advise or object before they're a done deal.
  The next commit will do that for libvirt.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>


  Commit: b02c9bc35a03c099600693d6909f4566078880b8
      
https://github.com/qemu/qemu/commit/b02c9bc35a03c099600693d6909f4566078880b8
  Author: Markus Armbruster <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: New section "Incompatible changes", copy libvir-list

Libvirt developers would like to be copied on patches to qemu-doc
appendix "Deprecated features".  Do them the favor.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>


  Commit: 8720e63e09fa1e48dbd244d89d6fed6b5c50889d
      
https://github.com/qemu/qemu/commit/8720e63e09fa1e48dbd244d89d6fed6b5c50889d
  Author: Markus Armbruster <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: Fix tracepoint crash on JSON syntax error

When tracepoint handle_qmp_command is enabled, we crash on JSON syntax
errors.  Broken in commit 1cc37471525.  Fix by skipping the tracepoint
on JSON syntax error.  Before the flawed commit, we skipped it by
returning early.

Fixes: CID 1394216
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Peter Xu <address@hidden>


  Commit: 102ad0a80f5110483efd06877c29c4236be267f9
      
https://github.com/qemu/qemu/commit/102ad0a80f5110483efd06877c29c4236be267f9
  Author: Peter Maydell <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M MAINTAINERS
    M hmp.c
    M monitor.c
    M qapi/introspect.json
    M qapi/misc.json
    A qemu-deprecated.texi
    M qemu-doc.texi
    M qemu-options.hx
    M qemu-tech.texi
    M qmp.c
    M scripts/qapi/introspect.py
    M tests/numa-test.c
    M tests/qmp-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-07-16' into 
staging

Miscellaneous patches for 2018-07-16 (3.0.0-rc1)

# gpg: Signature made Mon 16 Jul 2018 14:50:07 BST
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-misc-2018-07-16:
  monitor: Fix tracepoint crash on JSON syntax error
  MAINTAINERS: New section "Incompatible changes", copy libvir-list
  qemu-doc: Move appendix "Deprecated features" to its own file
  cli qmp: Mark --preconfig, exit-preconfig experimental
  qapi: Do not expose "allow-preconfig" in query-qmp-schema

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/633e82403721...102ad0a80f51
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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