Received: from eggs.gnu.org ([208.118.235.92]:39156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7b0i-0001Ii-DX for qemu-devel@nongnu.org; Tue, 13 Mar 2012 19:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7b0c-0007DB-6A for qemu-devel@nongnu.org; Tue, 13 Mar 2012 19:20:07 -0400 From: Alexander Graf Date: Wed, 14 Mar 2012 00:19:57 +0100 Message-Id: <1331680797-24546-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] PPC: KVM: Synchronize regs on CPU dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: qemu-ppc@nongnu.org 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 --- target-ppc/translate.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 9be88cc..4b8c769 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -9319,6 +9319,8 @@ void cpu_dump_state (CPUState *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); -- 1.6.0.2