summaryrefslogtreecommitdiff
path: root/target-ppc/machine.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-04-15 15:06:10 +1000
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:27 +0200
commit569be9f0551f5941335afa525b2b83d4dfb4210c (patch)
tree702691ace3c9746ff474a28f0e758791114255e0 /target-ppc/machine.c
parent9df5a46632dca802f382ae61d2d3d0fdbfb185a5 (diff)
downloadqemu-569be9f0551f5941335afa525b2b83d4dfb4210c.zip
target-ppc: Remove PVR check from migration
Currently migration fails if CPU version (PVR register) is different even a bit. This check is performed at the very end of migration when device states are sent. This is too late for management software and we need to provide a way for the user to make sure that migration will succeed if QEMU is started with appropritate command line parameters. This removes the PVR check. This resets PVR to the default value as the existing VMSTATE record for SPR array sends all 1024 registers unconditionally and overwrites the destination PVR. If the user wants some guarantees for migration to succeed, then a CPU name or "host" CPU with a "compat" option (on its way to upsteam) should be used and KVM or TCG is expected to fail on unsupported values at the moment of QEMU start. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/machine.c')
-rw-r--r--target-ppc/machine.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index d7807f88e6..c8f9835550 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -160,6 +160,11 @@ static int cpu_post_load(void *opaque, int version_id)
CPUPPCState *env = &cpu->env;
int i;
+ /*
+ * We always ignore the source PVR. The user or management
+ * software has to take care of running QEMU in a compatible mode.
+ */
+ env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
env->lr = env->spr[SPR_LR];
env->ctr = env->spr[SPR_CTR];
env->xer = env->spr[SPR_XER];
@@ -459,8 +464,7 @@ const VMStateDescription vmstate_ppc_cpu = {
.pre_save = cpu_pre_save,
.post_load = cpu_post_load,
.fields = (VMStateField[]) {
- /* Verify we haven't changed the pvr */
- VMSTATE_UINTTL_EQUAL(env.spr[SPR_PVR], PowerPCCPU),
+ VMSTATE_UNUSED(sizeof(target_ulong)), /* was _EQUAL(env.spr[SPR_PVR]) */
/* User mode architected state */
VMSTATE_UINTTL_ARRAY(env.gpr, PowerPCCPU, 32),