From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
sursingh@redhat.com, mdroth@linux.vnet.ibm.com,
David Gibson <david@gibson.dropbear.id.au>,
qemu-ppc@nongnu.org, sbobroff@redhat.com
Subject: Re: [Qemu-devel] [PATCH] spapr/htab: fix savevm
Date: Tue, 18 Jul 2017 11:33:34 +0200 [thread overview]
Message-ID: <eab73293-7f62-d79e-1b46-2786d4a3df9f@redhat.com> (raw)
In-Reply-To: <20170718080513.22522-1-lvivier@redhat.com>
On 18.07.2017 10:05, Laurent Vivier wrote:
> Commit 3a38429 ("spapr: Add a "no HPT" encoding to HTAB migration stream")
> allows to migrate an empty HPT, but doesn't mark correctly the
> end of the migration stream.
>
> The end condition (value returned by htab_save_iterate() and
> htab_save_complete()) should be 1, whereas in 3a38429 they
> return 0.
>
> The problem can be reproduced with QEMU monitor command "savevm":
> the command never stops and the disk image grows without limit.
>
> Fixes: 3a38429748aa4f74abaecf16c4c087e8a325e12a
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> hw/ppc/spapr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 970093e..fa01511 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1827,7 +1827,7 @@ static int htab_save_iterate(QEMUFile *f, void *opaque)
> /* Iteration header */
> if (!spapr->htab_shift) {
> qemu_put_be32(f, -1);
> - return 0;
> + return 1;
> } else {
> qemu_put_be32(f, 0);
> }
> @@ -1866,7 +1866,7 @@ static int htab_save_complete(QEMUFile *f, void *opaque)
> /* Iteration header */
> if (!spapr->htab_shift) {
> qemu_put_be32(f, -1);
> - return 0;
> + return 1;
> } else {
> qemu_put_be32(f, 0);
> }
>
I think you only need to change htab_save_iterate(), but not
htab_save_complete(), don't you? "1" does not seem to have any real
meaning for the *save_complete functions, as far as I can see.
Thomas
next prev parent reply other threads:[~2017-07-18 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 8:05 [Qemu-devel] [PATCH] spapr/htab: fix savevm Laurent Vivier
2017-07-18 9:33 ` Thomas Huth [this message]
2017-07-18 10:03 ` Laurent Vivier
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=eab73293-7f62-d79e-1b46-2786d4a3df9f@redhat.com \
--to=thuth@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sbobroff@redhat.com \
--cc=sursingh@redhat.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 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).