[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 7/7] ppc/pseries: Reset VPA registration on CPU reset
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 7/7] ppc/pseries: Reset VPA registration on CPU reset |
Date: |
Wed, 15 Aug 2012 14:33:48 +1000 |
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. Well, it corrects it for the full emu
case anyway. To fix the KVM case, we need some KVM extensions to actually
make the KVM internal VPA registration accessible to qemu. Patches coming
for qemu once the kernel updates are merged.
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/translate_init.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 6fe4168..2bc4a3f 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);
}
--
1.7.10.4
- [Qemu-ppc] [0/7] pseries: Patches to fix system reset, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 4/7] pseries: Use new method to correct reset sequence, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 1/7] Allow QEMUMachine to override reset sequencing, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 3/7] pseries: Fix and cleanup CPU initialization and reset, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 6/7] pseries: Clear TCE state when resetting PAPR VIO devices, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 7/7] ppc/pseries: Reset VPA registration on CPU reset,
David Gibson <=
- [Qemu-ppc] [PATCH 2/7] ppc: Make kvm_arch_put_registers() put *all* the registers, David Gibson, 2012/08/15
- [Qemu-ppc] [PATCH 5/7] pseries: Add support for new KVM hash table control call, David Gibson, 2012/08/15