From: Alexander Graf Date: Tue, 13 Mar 2012 23:13:22 +0000 (+0100) Subject: PPC: KVM: Synchronize regs on CPU dump X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=29979a8d2596d33b474c11efb376ed47ba1d44d3;p=qemu.git PPC: KVM: Synchronize regs on CPU dump 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 Signed-off-by: Alexander Graf --- diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 4722a09020..c9a503a1db 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -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);