@@ -42,6 +42,10 @@
do { } while (0)
#endif
+#ifdef KVM_CAP_SET_GUEST_DEBUG
+static void kvmppc_debug_init(int, int);
+#endif
+
int kvm_arch_init(KVMState *s, int smp_cpus)
{
return 0;
@@ -55,6 +59,12 @@ int kvm_arch_init_vcpu(CPUState *cenv)
sregs.pvr = cenv->spr[SPR_PVR];
ret = kvm_vcpu_ioctl(cenv, KVM_SET_SREGS, &sregs);
+#ifdef KVM_CAP_SET_GUEST_DEBUG
+ if (strcmp(cenv->cpu_model_str, "405"))
+ kvmppc_debug_init(4, 2);
+ if (strcmp(cenv->cpu_model_str, "e500v2_v30"))
+ kvmppc_debug_init(2, 2); /* E500v2 doesn't support IAC3,IAC4 */
+#endif
return ret;
}
440(BOOKE) supports 4 hardware breakpoints, while e500 supports 2. Signed-off-by: Liu Yu <yu.liu@freescale.com> --- target-ppc/kvm.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)