From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/4] migration/savevm: load_header before load_setup
Date: Tue, 14 May 2019 16:45:41 +0100 [thread overview]
Message-ID: <20190514154540.GM2753@work-vm> (raw)
In-Reply-To: <20190424004700.12766-4-richardw.yang@linux.intel.com>
* Wei Yang (richardw.yang@linux.intel.com) wrote:
> In migration_thread() and qemu_savevm_state(), we savevm_state in
> following sequence:
>
> qemu_savevm_state_header(f);
> qemu_savevm_state_setup(f);
>
> Then it would be more proper to loadvm_state in the save sequence.
>
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Yes, OK, I think that makes sense; the loadvm_state_setup
and savevm_state_setup are actually quite different in what they do,
however it does make sense to do the loadvm_state_setup after
we have the configuration loaded, because then potentially it means
we can alter the setup.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/savevm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 6c61056cde..a80ae83663 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -2427,10 +2427,6 @@ int qemu_loadvm_state(QEMUFile *f)
> return -ENOTSUP;
> }
>
> - if (qemu_loadvm_state_setup(f) != 0) {
> - return -EINVAL;
> - }
> -
> if (migrate_get_current()->send_configuration) {
> if (qemu_get_byte(f) != QEMU_VM_CONFIGURATION) {
> error_report("Configuration section missing");
> @@ -2445,6 +2441,10 @@ int qemu_loadvm_state(QEMUFile *f)
> }
> }
>
> + if (qemu_loadvm_state_setup(f) != 0) {
> + return -EINVAL;
> + }
> +
> cpu_synchronize_all_pre_loadvm();
>
> ret = qemu_loadvm_state_main(f, mis);
> --
> 2.19.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-05-14 15:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 0:46 [Qemu-devel] [PATCH 0/4] cleanup savevm Wei Yang
2019-04-24 0:46 ` Wei Yang
2019-04-24 0:46 ` [Qemu-devel] [PATCH 1/4] migration/savevm: remove duplicate check of migration_is_blocked Wei Yang
2019-04-24 0:46 ` Wei Yang
2019-04-25 19:20 ` Daniel Henrique Barboza
2019-04-26 0:39 ` Wei Yang
2019-04-26 0:39 ` Wei Yang
2019-05-14 14:46 ` Dr. David Alan Gilbert
2019-05-14 15:55 ` Dr. David Alan Gilbert
2019-04-24 0:46 ` [Qemu-devel] [PATCH 2/4] migration/savevm: use migration_is_blocked to validate Wei Yang
2019-04-24 0:46 ` Wei Yang
2019-04-25 20:55 ` Daniel Henrique Barboza
2019-04-26 0:51 ` Wei Yang
2019-04-26 0:51 ` Wei Yang
2019-05-14 15:18 ` Dr. David Alan Gilbert
2019-05-15 6:38 ` Wei Yang
2019-05-15 7:03 ` Wei Yang
2019-05-15 9:38 ` Dr. David Alan Gilbert
2019-05-15 12:28 ` Wei Yang
2019-04-24 0:46 ` [Qemu-devel] [PATCH 3/4] migration/savevm: load_header before load_setup Wei Yang
2019-04-24 0:46 ` Wei Yang
2019-05-14 15:45 ` Dr. David Alan Gilbert [this message]
2019-04-24 0:47 ` [Qemu-devel] [PATCH 4/4] migration/savevm: wrap into qemu_loadvm_state_header() Wei Yang
2019-04-24 0:47 ` Wei Yang
2019-04-25 22:07 ` Daniel Henrique Barboza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190514154540.GM2753@work-vm \
--to=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richardw.yang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.