]> git.proxmox.com Git - mirror_qemu.git/commitdiff
PPC: KVM: Synchronize regs on CPU dump
authorAlexander Graf <agraf@suse.de>
Tue, 13 Mar 2012 23:13:22 +0000 (00:13 +0100)
committerAlexander Graf <agraf@suse.de>
Thu, 15 Mar 2012 12:12:12 +0000 (13:12 +0100)
When we dump the CPU registers, there's a certain chance they haven't been
synchronized with KVM yet, so we have to manually trigger that.

This aligns the code with x86 and fixes a bug where the register state was
bogus on invalid/unknown kvm exit reasons.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/translate.c

index 4722a09020c5419416b7621242cc57b91b8d2941..c9a503a1db47692d9fe566671968a33d990e2b25 100644 (file)
@@ -9319,6 +9319,8 @@ void cpu_dump_state (CPUPPCState *env, FILE *f, fprintf_function cpu_fprintf,
 
     int i;
 
+    cpu_synchronize_state(env);
+
     cpu_fprintf(f, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "
                 TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",
                 env->nip, env->lr, env->ctr, env->xer);