qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC V1 00/14] precreate phase
@ 2024-10-17 15:14 Steve Sistare
  2024-10-17 15:14 ` [RFC V1 01/14] accel: encapsulate search state Steve Sistare
                   ` (15 more replies)
  0 siblings, 16 replies; 63+ messages in thread
From: Steve Sistare @ 2024-10-17 15:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Xu, Fabiano Rosas, David Hildenbrand, Marcel Apfelbaum,
	Eduardo Habkost, Philippe Mathieu-Daude, Paolo Bonzini,
	Daniel P. Berrange, Markus Armbruster, Steve Sistare

Define a new qemu initialization phase called 'precreate' which occurs
before most backends or devices have been created.  The only exception
is monitor and qtest devices and their associated chardevs.

QEMU runs in the main loop during this phase.  Monitor connections are
active and can receive migration configuration commands.  QEMU starts
listening on the normal migration URI during this phase, which can come
from either the QEMU command line or from a migrate_incoming command.
Thus the user can issue query-migrate to get the socket-address for
dynamically allocated port numbers during precreate.

In this series QEMU passes through and does not linger in the precreate
phase, and the user sees no change in behavior.  The cpr-transfer series
will linger in the phase for an incoming CPR operation, and exit the phase
when the migrate command is send to source QEMU and causes destination QEMU
to read CPR state.

A future series may wish to add a command-line argument and monitor
command that enters and exits the precreate phase for general purpose use.
That would enable the user to issue monitor commands that specify backend
creation parameters.

Now that both the monitor and migration are initialized early, one could
implement a future scheme in which very few parameters are passed on the
command line, and all backend and device creation parameters are passed
in the migration stream.

Patches 1-5 untangle dependencies between accelerator and migration
initialization, allowing the latter to be called earlier.  Currently
configure_accelerators chooses the accelerator, defines compatability
properties needed to initialize migration, and creates the machine in
accel_init_machine.  The patches split configure_accelerators into a first
part which probes for accelerators and defines properties, and a second
part which creates the machine.  The second part is called after the
precreate phase.  The patches also set machine options earlier, so they
are known when migration is initialized.

Patch 6 defines the boundaries of the precreate phase.

Patches 7-12 define and use helper functions to extract monitor and qtest
options from the command line, find their associated chardevs, and initialize
the monitor and qtest devices early, prior to qemu_create_early_backends.

Patches 13-14 contain miscellany.

Steve Sistare (14):
  accel: encapsulate search state
  accel: accel preinit function
  accel: split configure_accelerators
  accel: set accelerator and machine props earlier
  migration: init and listen during precreate
  vl: precreate phase
  monitor: chardev name
  qom: get properties
  qemu-option: filtered foreach
  qemu-options: pass object to filter
  monitor: connect in precreate
  qtest: connect in precreate
  net: cleanup for precreate phase
  migration: allow commands during precreate and preconfig

 accel/accel-system.c            |   2 -
 accel/kvm/kvm-all.c             |  58 +++++----
 accel/xen/xen-all.c             |  11 +-
 hmp-commands.hx                 |   2 +
 include/monitor/monitor.h       |   1 +
 include/qapi/visitor.h          |   1 +
 include/qemu/accel.h            |   1 +
 include/qemu/option.h           |   5 +
 include/qom/object_interfaces.h |   8 ++
 monitor/monitor.c               |  21 ++++
 net/net.c                       |   4 +-
 qapi/migration.json             |  16 ++-
 qapi/misc.json                  |   3 +-
 qom/object_interfaces.c         |  27 ++--
 system/vl.c                     | 270 ++++++++++++++++++++++++++++++----------
 target/i386/nvmm/nvmm-all.c     |  10 +-
 target/i386/whpx/whpx-all.c     |  14 ++-
 util/qemu-option.c              |  25 ++++
 18 files changed, 358 insertions(+), 121 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2024-10-29 15:59 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 15:14 [RFC V1 00/14] precreate phase Steve Sistare
2024-10-17 15:14 ` [RFC V1 01/14] accel: encapsulate search state Steve Sistare
2024-10-21 20:03   ` Fabiano Rosas
2024-10-17 15:14 ` [RFC V1 02/14] accel: accel preinit function Steve Sistare
2024-10-17 15:26   ` Steven Sistare
2024-10-21 14:54   ` Peter Xu
2024-10-23 16:13     ` Steven Sistare
2024-10-23 15:53   ` Paolo Bonzini
2024-10-23 16:25     ` Steven Sistare
2024-10-17 15:14 ` [RFC V1 03/14] accel: split configure_accelerators Steve Sistare
2024-10-17 15:14 ` [RFC V1 04/14] accel: set accelerator and machine props earlier Steve Sistare
2024-10-18 15:08   ` Fabiano Rosas
2024-10-18 15:32     ` Steven Sistare
2024-10-18 15:40       ` Steven Sistare
2024-10-18 19:15         ` Steven Sistare
2024-10-21 16:20           ` Peter Xu
2024-10-23 17:16             ` Paolo Bonzini
2024-10-22  8:30           ` David Hildenbrand
2024-10-23 20:28             ` Steven Sistare
2024-10-21 15:19   ` Peter Xu
2024-10-23 20:29     ` Steven Sistare
2024-10-23 16:00   ` Paolo Bonzini
2024-10-23 17:18     ` Paolo Bonzini
2024-10-23 20:29     ` Steven Sistare
2024-10-17 15:14 ` [RFC V1 05/14] migration: init and listen during precreate Steve Sistare
2024-10-21 16:41   ` Peter Xu
2024-10-21 21:05   ` Fabiano Rosas
2024-10-23 16:01     ` Steven Sistare
2024-10-17 15:14 ` [RFC V1 06/14] vl: precreate phase Steve Sistare
2024-10-23 14:03   ` Fabiano Rosas
2024-10-17 15:14 ` [RFC V1 07/14] monitor: chardev name Steve Sistare
2024-10-17 15:14 ` [RFC V1 08/14] qom: get properties Steve Sistare
2024-10-17 15:14 ` [RFC V1 09/14] qemu-option: filtered foreach Steve Sistare
2024-10-17 15:14 ` [RFC V1 10/14] qemu-options: pass object to filter Steve Sistare
2024-10-17 15:14 ` [RFC V1 11/14] monitor: connect in precreate Steve Sistare
2024-10-21 19:28   ` Peter Xu
2024-10-23 17:34     ` Steven Sistare
2024-10-23 16:05   ` Paolo Bonzini
2024-10-23 17:35     ` Steven Sistare
2024-10-17 15:14 ` [RFC V1 12/14] qtest: " Steve Sistare
2024-10-17 15:14 ` [RFC V1 13/14] net: cleanup for precreate phase Steve Sistare
2024-10-17 15:27   ` Steven Sistare
2024-10-21 19:20   ` Peter Xu
2024-10-23 17:43     ` Steven Sistare
2024-10-17 15:14 ` [RFC V1 14/14] migration: allow commands during precreate and preconfig Steve Sistare
2024-10-21 19:36   ` Peter Xu
2024-10-23 17:50     ` Steven Sistare
2024-10-17 15:19 ` [RFC V1 00/14] precreate phase Steven Sistare
2024-10-17 15:53   ` Peter Xu
2024-10-21 15:56     ` Steven Sistare
2024-10-23 16:31 ` Paolo Bonzini
2024-10-24 21:16   ` Steven Sistare
2024-10-25  8:46     ` Daniel P. Berrangé
2024-10-25 13:33       ` Steven Sistare
2024-10-25 13:43         ` Daniel P. Berrangé
2024-10-25 14:32           ` Steven Sistare
2024-10-25 14:49             ` Daniel P. Berrangé
2024-10-28 21:56           ` Peter Xu
2024-10-29  9:09             ` Daniel P. Berrangé
2024-10-29 11:13           ` Daniel P. Berrangé
2024-10-29 13:20             ` Fabiano Rosas
2024-10-29 15:18               ` Peter Xu
2024-10-29 15:58               ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).