[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC 16/17] ppc: Remove counter-productive "sanity checks" in
From: |
David Gibson |
Subject: |
[Qemu-ppc] [RFC 16/17] ppc: Remove counter-productive "sanity checks" in migration |
Date: |
Sun, 30 Oct 2016 22:12:07 +1100 |
When vmstate for the ppc cpu was introduced in a90db158 "target-ppc:
Convert ppc cpu savevm to VMStateDescription", several "sanity check"
fields were included, verifying that certain cpu parameters matched between
source and destination.
This turns out not to have been a good idea. For one thing it's redundant
with existing checks for a compatible cpu version at either end. But more
importantly the insns_flags and insns_flags2 checks actively break things:
they expose what's essentially an internal TCG implementation detail in the
migration stream. That means that when new instruction classes are added
or rearranged, migration can break.
This removes these ill-considered sanity checks.
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/machine.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index 62b9e94..453ef0a 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -602,10 +602,10 @@ const VMStateDescription vmstate_ppc_cpu = {
/* FIXME: access_type? */
/* Sanity checking */
- VMSTATE_UINTTL_EQUAL(env.msr_mask, PowerPCCPU),
- VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU),
- VMSTATE_UINT64_EQUAL(env.insns_flags2, PowerPCCPU),
- VMSTATE_UINT32_EQUAL(env.nb_BATs, PowerPCCPU),
+ VMSTATE_UNUSED(sizeof(target_ulong) /* msr_mask */
+ + sizeof(uint64_t) /* insns_flags */
+ + sizeof(uint64_t) /* insns_flags2 */
+ + sizeof(uint32_t)), /* nb_BATs */
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription*[]) {
--
2.7.4
- [Qemu-ppc] [RFC 01/17] ppc: Remove some stub POWER6 models, (continued)
- [Qemu-ppc] [RFC 01/17] ppc: Remove some stub POWER6 models, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 14/17] pseries: Reset CPU compatibility mode, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 06/17] ppc: Rename cpu_version to compat_pvr, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 05/17] ppc: Clean up and QOMify hypercall emulation, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 08/17] ppc: Rewrite ppc_get_compat_smt_threads(), David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 12/17] ppc: Migrate compatibility mode, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 17/17] pseries: Default to POWER8 compatibility mode, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 16/17] ppc: Remove counter-productive "sanity checks" in migration,
David Gibson <=
- [Qemu-ppc] [RFC 04/17] pseries: Make cpu_update during CAS unconditional, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 15/17] ppc: Check that CPU model stays consistent across migration, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 03/17] pseries: Always use core objects for CPU construction, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 07/17] ppc: Rewrite ppc_set_compat(), David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 09/17] ppc: Validate compatibility modes when setting, David Gibson, 2016/10/30
- [Qemu-ppc] [RFC 10/17] pseries: Rewrite CAS PVR compatibility logic, David Gibson, 2016/10/30