[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken |
Date: |
Thu, 22 Sep 2016 12:32:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
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.
*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
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, (continued)
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Cédric Le Goater, 2016/09/22
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Dr. David Alan Gilbert, 2016/09/22
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Dr. David Alan Gilbert, 2016/09/22
- Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Bharata B Rao, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken,
Paolo Bonzini <=
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, David Gibson, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Cédric Le Goater, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, David Gibson, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Benjamin Herrenschmidt, 2016/09/22
- Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, David Gibson, 2016/09/23
Re: [Qemu-ppc] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Nikunj A Dadhania, 2016/09/22
Re: [Qemu-ppc] [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken, Dr. David Alan Gilbert, 2016/09/22