diff options
author | Igor Mammedov <imammedo@redhat.com> | 2018-05-11 19:24:43 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-05-30 13:19:14 -0300 |
commit | 047f7038f586d2150f16c6d9ba9cfd0479f0f6ac (patch) | |
tree | a330df8c7e3930d4edf457dc0a8db9366931653b /qapi/misc.json | |
parent | 7b13f2c27a02499e9f8d955e0a4c68a5165e150d (diff) | |
download | qemu-047f7038f586d2150f16c6d9ba9cfd0479f0f6ac.zip qemu-047f7038f586d2150f16c6d9ba9cfd0479f0f6ac.tar.gz qemu-047f7038f586d2150f16c6d9ba9cfd0479f0f6ac.tar.bz2 |
cli: add --preconfig option
This option 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 new option complements -S option and could be used with or without
it. The difference is that -S pauses QEMU when the machine is completely
initialized with all devices wired up and ready to execute guest code
(QEMU needs only to unpause VCPUs to let guest execute its code),
while the "preconfig" option pauses QEMU early before board specific init
callback (machine_run_board_init) is executed and allows the configuration
of machine parameters which will be used by board init code.
When early introspection/configuration is done, command 'exit-preconfig'
should be used to exit RUN_STATE_PRECONFIG and transition to the next
requested state (i.e. if -S is used then QEMU will pause the second
time when board/device initialization is completed or start guest
execution if -S isn't provided on CLI)
PS:
Initially 'preconfig' is planned to be used for configuring numa
topology depending on board specified possible cpus layout.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1526059483-42847-1-git-send-email-imammedo@redhat.com>
[ehabkost: Changed "since 2.13" to "since 3.0"]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'qapi/misc.json')
-rw-r--r-- | qapi/misc.json | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/qapi/misc.json b/qapi/misc.json index ae2bb27..bd6d180 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1245,6 +1245,29 @@ { 'command': 'cont' } ## +# @exit-preconfig: +# +# Exit from "preconfig" state +# +# This command makes QEMU exit the preconfig state and proceed with +# VM initialization using configuration data provided on the command line +# and via the QMP monitor during the preconfig state. The command is only +# available during the preconfig state (i.e. when the --preconfig command +# line option was in use). +# +# Since 3.0 +# +# Returns: nothing +# +# Example: +# +# -> { "execute": "exit-preconfig" } +# <- { "return": {} } +# +## +{ 'command': 'exit-preconfig', 'allow-preconfig': true } + +## # @system_wakeup: # # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. |