From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org, clg@kaod.org
Subject: Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken
Date: Thu, 22 Sep 2016 11:28:31 +0100 [thread overview]
Message-ID: <20160922102831.GE2085@work-vm> (raw)
In-Reply-To: <8760po5k3x.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me>
* Nikunj A Dadhania (nikunj@linux.vnet.ibm.com) wrote:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:
>
> > * Bharata B Rao (bharata@linux.vnet.ibm.com) wrote:
> >> On Thu, Sep 22, 2016 at 03:30:08PM +1000, David Gibson wrote:
> >> > On Thu, Sep 22, 2016 at 10:51:05AM +0530, Bharata B Rao wrote:
> >> > > Hi,
> >> > >
> >> > > Nikunj and I realized that migrating pseries-2.6 guest from QEMU-2.6
> >> > > to newer QEMU-2.7 is broken like this:
> >> > >
> >> > > qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
> >> > > qemu-system-ppc64: load of migration failed: Invalid argument
> >> > >
> >> > > Bisecting tells us that 4e0806110c8b896ceff3490f15a616e8b3165efe
> >> > > (ppc: Add PPC_64H instruction flag to POWER7 and POWER8) is the
> >> > > first bad commit. Along with this there are other 3 similar commits
> >> > > which add new bits to insns_flags and insns_flags2 fields of POWER7
> >> > > and POWER8 CPUs.
> >> > >
> >> > > 4e0806110c8b896ceff3490f15a616e8b3165efe Adds PPC_64H to POWER7 and POWER8
> >> > > dfdd3e43620a6cd4f2be31da5a257c84a16fc000 Adds PPC_64BX to POWER7
> >> > > b781537560e3b968b6fe1395e3d07bd67f0009ba Adds PPC_CILDST to POWER7 and POWER8
> >> > > 7778a575c7055276afdd01737e9d1029a65f923d Adds PPC2_PM_ISA206 to POWER7 and POWER8
> >> > >
> >> > > The flag values are expected to remain same for a machine version for
> >> > > the migration to succeed, but this expectation is broken now. Should
> >> > > we make the addition of these flags conditional on machine type version ?
> >> > > But these flags are part of POWER8 CPU definition which is common for
> >> > > both pseries and upcoming powernv.
> >> >
> >> > Can you step me through how the new flags are breaking the migration?
> >> > It's not immediately obvious to me.
> >>
> >> Here is what I understand. Given below is the pruned vmstate_ppc_cpu
> >> data structure.
> >>
> >> const VMStateDescription vmstate_ppc_cpu = {
> >> .name = "cpu",
> >> .fields = (VMStateField[]) {
> >> /* Sanity checking */
> >> VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU),
> >> VMSTATE_UINT64_EQUAL(env.insns_flags2, PowerPCCPU),
> >> VMSTATE_END_OF_LIST()
> >> },
> >> };
> >>
> >> When pseries-2.6 guest is started at the source with QEMU-2.6, insns_flags
> >> and insns_flags2 will not have PPC_64H, PPC_64BX, PPC_CILDST, PPC2_PM_ISA206
> >> set. However at the target when pseries-2.6 guest is started with QEMU-2.7,
> >> these flags will be set. And I believe VMSTATE_UINT64_EQUAL checks above
> >> will cause migration to fail.
> >
> > You might find the first two patches in:
> > https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg03681.html
> > useful in debugging this; it prints the values when the _EQUAL macros fail and prints
> > the field name that fails.
>
> Thanks, we were using trace, this is very helpful without trace
> during error conditions.
>
> qemu-system-ppc64: 9223477658187168481 != 9223477658187151905
> qemu-system-ppc64: Failed to load cpu:env.insns_flags
> qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
> qemu-system-ppc64: load of migration failed: Invalid argument
Ah good, that's what I was hoping for (I'll change them to hex before I
repost that series).
Dave
>
> Regards,
> Nikunj
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-09-22 10:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 5:21 [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken Bharata B Rao
2016-09-22 5:30 ` David Gibson
2016-09-22 6:00 ` Bharata B Rao
2016-09-22 6:36 ` Cédric Le Goater
2016-09-22 9:46 ` Dr. David Alan Gilbert
2016-09-22 10:01 ` Nikunj A Dadhania
2016-09-22 10:28 ` Dr. David Alan Gilbert [this message]
2016-09-22 11:18 ` Nikunj A Dadhania
2016-09-22 6:07 ` Benjamin Herrenschmidt
2016-09-22 6:15 ` Bharata B Rao
2016-09-22 8:47 ` Benjamin Herrenschmidt
2016-09-22 9:04 ` Nikunj A Dadhania
2016-09-22 10:04 ` Benjamin Herrenschmidt
2016-09-22 10:32 ` Paolo Bonzini
2016-09-22 11:07 ` Benjamin Herrenschmidt
2016-09-23 1:01 ` David Gibson
2016-09-22 11:07 ` Nikunj A Dadhania
2016-09-22 11:27 ` Cédric Le Goater
2016-09-22 11:37 ` Benjamin Herrenschmidt
2016-09-23 1:37 ` David Gibson
2016-09-23 3:27 ` Benjamin Herrenschmidt
2016-09-23 5:49 ` David Gibson
2016-09-22 19:00 ` Nikunj A Dadhania
2016-09-22 16:07 ` Dr. David Alan Gilbert
2016-09-22 17:27 ` Nikunj A Dadhania
2016-09-22 10:34 ` Alexey Kardashevskiy
2016-09-22 11:09 ` Benjamin Herrenschmidt
2016-09-23 0:52 ` David Gibson
2016-09-23 3:18 ` Nikunj A Dadhania
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=20160922102831.GE2085@work-vm \
--to=dgilbert@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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.