OSDN Git Service

migration/savevm: Move more savevm handling into vmstate_save()
authorDavid Hildenbrand <david@redhat.com>
Tue, 17 Jan 2023 11:22:42 +0000 (12:22 +0100)
committerJuan Quintela <quintela@redhat.com>
Mon, 6 Feb 2023 18:22:56 +0000 (19:22 +0100)
commit5e104f24e7ddfa33d5e99b6363c7baf02849f9b7
tree11933096f7b7fcae9319555faebbc4b4f480b96d
parente41c57702e940fcb9a8046edc3b43edda5134305
migration/savevm: Move more savevm handling into vmstate_save()

Let's move more code into vmstate_save(), reducing code duplication and
preparing for reuse of vmstate_save() in qemu_savevm_state_setup(). We
have to move vmstate_save() to make the compiler happy.

We'll now also trace from qemu_save_device_state(), triggering the same
tracepoints as previously called from
qemu_savevm_state_complete_precopy_non_iterable() only. Note that
qemu_save_device_state() ignores iterable device state, such as RAM,
and consequently doesn't trigger some other trace points (e.g.,
trace_savevm_state_setup()).

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/savevm.c