[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken |
Date: |
Fri, 23 Sep 2016 11:01:42 +1000 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Thu, Sep 22, 2016 at 12:32:24PM +0200, Paolo Bonzini wrote:
>
>
> On 22/09/2016 12:04, Benjamin Herrenschmidt wrote:
> > On Thu, 2016-09-22 at 14:34 +0530, Nikunj A Dadhania wrote:
> >> Something like this works for KVM:
> >>
> >> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> >> index 4820f22..1cf3779 100644
> >> --- a/target-ppc/machine.c
> >> +++ b/target-ppc/machine.c
> >> @@ -563,8 +563,8 @@ const VMStateDescription vmstate_ppc_cpu = {
> >>
> >> /* Sanity checking */
> >> VMSTATE_UINTTL_EQUAL(env.msr_mask, PowerPCCPU),
> >> - VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU),
> >> - VMSTATE_UINT64_EQUAL(env.insns_flags2, PowerPCCPU),
> >> + VMSTATE_UNUSED(sizeof(target_ulong)), /* was
> >> _EQUAL(env.insns_flags) */
> >> + VMSTATE_UNUSED(sizeof(target_ulong)), /* was
> >> _EQUAL(env.insns_flags2) */
> >> VMSTATE_UINT32_EQUAL(env.nb_BATs, PowerPCCPU),
> >> VMSTATE_END_OF_LIST()
> >> },
> >>
> >> TCG migration still remains broken with this.
> >
> > Can we have conditionally present flags and a post-load that does some
> > matching ?
>
> Yes, you can use something like
>
> VMSTATE_UINT64(env.src_insns_flags, PowerPCCPU),
> VMSTATE_UINT64(env.src_insns_flags2, PowerPCCPU),
>
> and a post_load that compares them if kvm_enabled() only.
We could, but I'm not convinced there's any point. I don't see that
migrating these flags actually has any value beyond a sanity check,
the consequences of which we obviously didn't think through fully.
They should just be a TCG internal matter.
> *However* a better fix would be to preserve the old flags for
> pseries-2.6, and only set the newer flags for pseries-2.7. I'm not
> saying you have to do this, but if it's not hard (no idea) why not learn
> how to do it right.
>
> The design is not stupid, it's just that compatibility is harder than
> you think and you are going through the same learning experiences that
> x86 went though.
>
> Paolo
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, (continued)
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Bharata B Rao, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Paolo Bonzini, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken,
David Gibson <=
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Cédric Le Goater, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, David Gibson, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, David Gibson, 2016/09/23
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Dr. David Alan Gilbert, 2016/09/22
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Alexey Kardashevskiy, 2016/09/22