On 5/7/2024 5:02 PM, Fabiano Rosas wrote:
Steve Sistare <steven.sist...@oracle.com> writes:

Provide the VMStateDescription precreate field to mark objects that must
be loaded on the incoming side before devices have been created, because
they provide properties that will be needed at creation time.  They will
be saved to and loaded from their own QEMUFile, via

It's not obvious to me what the reason is to have a separate
QEMUFile. Could you expand on this?

The migration stream is read in the calling sequence at B below, but precreate
state is needed at A before chardev and memory backends are created.

main()
  qemu_init()
    A:
    qemu_create_early_backends()
    qemu_create_late_backends()
    migration_object_init()
    qmp_x_exit_preconfig()
      qmp_migrate_incoming()

  qemu_default_main()
    qemu_main_loop()
      fd_accept_incoming_migration()
        migration_channel_process_incoming()
          migration_ioc_process_incoming()
            migration_incoming_process()
              process_incoming_migration_co()
                B:
                qemu_loadvm_state()

precreate objects could be emitted first in the existing migration stream and
read at A, but this requires untangling numerous ordering dependencies amongst
migration_object_init, qemu_create_machine, configure_accelerators, monitor
init, and the main loop.

- Steve

Reply via email to