qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Cc: Juan Quintela <quintela@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"patches@linaro.org" <patches@linaro.org>,
	Shannon Zhao <zhaoshenglong@huawei.com>,
	Shannon Zhao <shannon.zhaosl@gmail.com>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function
Date: Mon, 6 Aug 2018 11:00:40 +0100	[thread overview]
Message-ID: <CAFEAcA_qmdth9SjAcoRrAmDLP36-oHyT6BmaQv0U88mnDh2+7w@mail.gmail.com> (raw)
In-Reply-To: <20180803163646.31068-2-peter.maydell@linaro.org>

Forgot to cc Shannon on this one. Given that the missing .needed
function meant we weren't ever transmitting the subsection with
the no-shift-bug flag, this ought to mean that for current
master migration of KVM goes wrong (since the destination thinks
the source has the bug when it does not). I'm just going to try
to set up to test this...

thanks
-- PMM

On 3 August 2018 at 17:36, Peter Maydell <peter.maydell@linaro.org> wrote:
> Currently the migration code incorrectly treats a subsection with
> no .needed function pointer as if it was the subsection list
> terminator -- it is ignored and so is everything after it.
> Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug
> a 'needed' function that always returns true.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> This should go into 3.0 to avoid awkward migration compat problems:
> the no-migration-shift-bug subsection is new in 3.0.
> ---
>  hw/intc/arm_gicv3_common.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
> index ff326b374ad..e58bc8b8105 100644
> --- a/hw/intc/arm_gicv3_common.c
> +++ b/hw/intc/arm_gicv3_common.c
> @@ -203,10 +203,16 @@ static int gicv3_gicd_no_migration_shift_bug_post_load(void *opaque,
>      return 0;
>  }
>
> +static bool needed_always(void *opaque)
> +{
> +    return true;
> +}
> +
>  const VMStateDescription vmstate_gicv3_gicd_no_migration_shift_bug = {
>      .name = "arm_gicv3/gicd_no_migration_shift_bug",
>      .version_id = 1,
>      .minimum_version_id = 1,
> +    .needed = needed_always,
>      .pre_load = gicv3_gicd_no_migration_shift_bug_pre_load,
>      .post_load = gicv3_gicd_no_migration_shift_bug_post_load,
>      .fields = (VMStateField[]) {
> --
> 2.17.1

  parent reply	other threads:[~2018-08-06 10:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 16:36 [Qemu-devel] [PATCH 0/3] Arm migration fixes for 3.0 Peter Maydell
2018-08-03 16:36 ` [Qemu-devel] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function Peter Maydell
2018-08-03 17:29   ` Dr. David Alan Gilbert
2018-08-06 10:00   ` Peter Maydell [this message]
2018-08-03 16:36 ` [Qemu-devel] [PATCH 2/3] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu Peter Maydell
2018-08-03 17:08   ` Dr. David Alan Gilbert
2018-08-03 16:36 ` [Qemu-devel] [PATCH 3/3] target/arm: Add dummy needed functions to M profile vmstate subsections Peter Maydell
2018-08-03 17:31   ` Dr. David Alan Gilbert

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=CAFEAcA_qmdth9SjAcoRrAmDLP36-oHyT6BmaQv0U88mnDh2+7w@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=patches@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=shannon.zhaosl@gmail.com \
    --cc=zhaoshenglong@huawei.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).