Received: from eggs.gnu.org ([208.118.235.92]:41122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S89Zo-0002ux-Gt for qemu-devel@nongnu.org; Thu, 15 Mar 2012 08:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S89Ze-0002RO-JY for qemu-devel@nongnu.org; Thu, 15 Mar 2012 08:14:40 -0400 From: Alexander Graf Date: Thu, 15 Mar 2012 13:14:20 +0100 Message-Id: <1331813662-15141-15-git-send-email-agraf@suse.de> In-Reply-To: <1331813662-15141-1-git-send-email-agraf@suse.de> References: <1331813662-15141-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 14/16] 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: blauwirbel@gmail.com, qemu-ppc@nongnu.org, aurelien@aurel32.net 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 4722a09..c9a503a 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); -- 1.6.0.2