qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/9] CLI: add -preconfig option


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 3/9] CLI: add -preconfig option
Date: Tue, 27 Feb 2018 14:39:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/16/2018 06:37 AM, Igor Mammedov wrote:
Option allows to pause QEMU at new RUN_STATE_PRECONFIG time,
which would allow to configure QEMU from QMP before machine
jumps into board initialization code machine_run_board_init().

Grammar suggestion:

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().


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

Initially it's planned to be used for configuring numa
topology depending on cpu layout.

It may be worth mentioning in the commit message how this differs from -S, and what the QMP client must do to get the guest started in this mode to enter the normal lifecycle that it used to have when using -S.


Signed-off-by: Igor Mammedov <address@hidden>
---
  include/sysemu/sysemu.h |  1 +
  qapi/run-state.json     |  3 ++-
  qemu-options.hx         | 11 +++++++++++
  qmp.c                   |  5 +++++
  vl.c                    | 35 ++++++++++++++++++++++++++++++++++-
  5 files changed, 53 insertions(+), 2 deletions(-)


+++ b/qapi/run-state.json
@@ -49,12 +49,13 @@
  # @colo: guest is paused to save/restore VM state under colo checkpoint,
  #        VM can not get into this state unless colo capability is enabled
  #        for migration. (since 2.8)
+# @preconfig: QEMU is paused before machine is created.

Needs a '(since 2.12)' tag. Probably also be worth mentioning that this state is only visible for clients that pass the new CLI option.

+++ b/qemu-options.hx
@@ -3283,6 +3283,17 @@ STEXI
  Run the emulation in single step mode.
  ETEXI
+DEF("preconfig", 0, QEMU_OPTION_preconfig, \
+    "-preconfig      pause QEMU before machine is initialized\n",
+    QEMU_ARCH_ALL)
+STEXI
address@hidden -preconfig
address@hidden -preconfig
+Pause QEMU for interactive configuration before machine is created,
+which allows to query and configure properties affecting machine
+initialization. Use QMP command 'cont' to exit paused state.

Pause QEMU for interactive configuration before the machine is created, which allows querying and configuring properties that will affect machine initialization. Use the QMP command 'cont' to exit the preconfig state.

Hmm - can you also transition from preconfig to the normal paused state via 'stop', which you would do to emit other commands that you used to issue between the older 'qemu -S' and the 'cont'?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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