summaryrefslogtreecommitdiffstats
path: root/target-ppc
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2012-09-25 17:12:21 +0000
committerAlexander Graf <agraf@suse.de>2012-10-05 02:35:11 +0200
commit2b15811c8cd4dbe8dcde32320936fe74e51e4279 (patch)
tree7a6e0fcc3f11fabc9f6975ae87b61ff4da2e3573 /target-ppc
parentefcb9383b974114e5f682e531346006f8f2466c0 (diff)
downloadhqemu-2b15811c8cd4dbe8dcde32320936fe74e51e4279.zip
hqemu-2b15811c8cd4dbe8dcde32320936fe74e51e4279.tar.gz
ppc/pseries: Reset VPA registration on CPU reset
The ppc specific CPU state contains several variables which track the VPA, SLB shadow and dispatch trace log. These are structures shared between OS and hypervisor that are used on the pseries machine to track various per-CPU quantities. The address of these structures needs to be registered by the guest on each boot, however currently this registration is not cleared when we reset the cpu. This patch corrects this bug. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/translate_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index fba2b42..a972287 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -10423,6 +10423,14 @@ static void ppc_cpu_reset(CPUState *s)
env->pending_interrupts = 0;
env->exception_index = POWERPC_EXCP_NONE;
env->error_code = 0;
+
+#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
+ env->vpa = 0;
+ env->slb_shadow = 0;
+ env->dispatch_trace_log = 0;
+ env->dtl_size = 0;
+#endif /* TARGET_PPC64 */
+
/* Flush all TLBs */
tlb_flush(env, 1);
}
OpenPOWER on IntegriCloud