qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org, Juan Quintela <quintela@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Shannon Zhao <zhaoshenglong@huawei.com>,
	Shannon Zhao <shannon.zhaosl@gmail.com>
Subject: [Qemu-devel] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0
Date: Mon,  6 Aug 2018 13:34:40 +0100	[thread overview]
Message-ID: <20180806123445.1459-1-peter.maydell@linaro.org> (raw)

This patchset primarily fixes problems with Arm migration
induced by a bug in the core vmstate handling of subsections:
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.

I did an audit of all uses of subsections in QEMU, and found
that we had four which didn't define a .needed function (assuming
that this meant "always needed", same as the semantics for
not providing a .needed function for a toplevel vmsd).
This patchset fixes them all up by providing a dummy needed
function.

It also fixes an error in vmstate_gicv3_cpu which was accidentally
initializing .subsections twice and so ignoring one of the subsections.

Patches 1..3 are the same as for v1 and have been reviewed.
Patches 4 and 5 fix a further bug which I discovered during
testing of 1..3: the GICv3 migration structs had several
uses of the pre_load and post_load hooks which assumed that the
hooks were run whether the subsection was present or not. In
fact the migration code only runs the hooks when the subsection
is present in the incoming migration stream, and so for correct
behaviour we need to move the code we were running in the hooks
up to the parent VMSDs.

I've now tested this by doing a save/load of:
 2.12.0 QEMU -> new QEMU
 new QEMU -> new QEMU

An on-trunk QEMU prior to these bugfixes won't migrate
to a QEMU with the bugfixes, but we never released any
final QEMU version with the bugs in.

thanks
-- PMM

Peter Maydell (5):
  hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a
    needed function
  hw/intc/arm_gicv3_common: Combine duplicate .subsections in
    vmstate_gicv3_cpu
  target/arm: Add dummy needed functions to M profile vmstate
    subsections
  hw/intc/arm_gicv3_common: Move post_load hooks to top-level VMSD
  hw/intc/arm_gicv3_common: Move gicd shift bug handling to
    gicv3_post_load

 hw/intc/arm_gicv3_common.c | 284 ++++++++++++++++++-------------------
 target/arm/machine.c       |   3 +
 2 files changed, 145 insertions(+), 142 deletions(-)

-- 
2.17.1

             reply	other threads:[~2018-08-06 12:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 12:34 Peter Maydell [this message]
2018-08-06 12:34 ` [Qemu-devel] [PATCH for-3.0 v2 1/5] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function Peter Maydell
2018-08-07 14:34   ` Juan Quintela
2018-08-06 12:34 ` [Qemu-devel] [PATCH for-3.0 v2 2/5] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu Peter Maydell
2018-08-07 14:34   ` Juan Quintela
2018-08-06 12:34 ` [Qemu-devel] [PATCH for-3.0 v2 3/5] target/arm: Add dummy needed functions to M profile vmstate subsections Peter Maydell
2018-08-07 14:40   ` Juan Quintela
2018-08-07 14:45     ` Peter Maydell
2018-08-07 14:50       ` Juan Quintela
2018-08-06 12:34 ` [Qemu-devel] [PATCH for-3.0 v2 4/5] hw/intc/arm_gicv3_common: Move post_load hooks to top-level VMSD Peter Maydell
2018-08-06 15:32   ` Dr. David Alan Gilbert
2018-08-07 14:41   ` Juan Quintela
2018-08-06 12:34 ` [Qemu-devel] [PATCH for-3.0 v2 5/5] hw/intc/arm_gicv3_common: Move gicd shift bug handling to gicv3_post_load Peter Maydell
2018-08-06 15:39   ` Dr. David Alan Gilbert
2018-08-06 14:06 ` [Qemu-devel] [PATCH for-3.0 v2 0/5] Arm migration fixes for 3.0 Richard Henderson
2018-08-06 16:50   ` Peter Maydell

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=20180806123445.1459-1-peter.maydell@linaro.org \
    --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).