qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/5] kvmppc: guest debug init


From: Liu Yu
Subject: [Qemu-devel] [PATCH 5/5] kvmppc: guest debug init
Date: Tue, 4 Aug 2009 17:36:08 +0800

440(BOOKE) supports 4 hardware breakpoints,
while e500 supports 2.

Signed-off-by: Liu Yu <address@hidden>
---
 target-ppc/kvm.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 97a0737..82e7897 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -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;
 }
 
-- 
1.5.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]