From: Liu Yu Date: Tue, 04 Aug 2009 09:36:08 +0000 Subject: [PATCH 5/5] kvmppc: guest debug init Message-Id: <1249378568-18008-6-git-send-email-yu.liu@freescale.com> List-Id: References: <1249378568-18008-1-git-send-email-yu.liu@freescale.com> <1249378568-18008-2-git-send-email-yu.liu@freescale.com> <1249378568-18008-3-git-send-email-yu.liu@freescale.com> <1249378568-18008-4-git-send-email-yu.liu@freescale.com> <1249378568-18008-5-git-send-email-yu.liu@freescale.com> In-Reply-To: <1249378568-18008-5-git-send-email-yu.liu@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: qemu-devel@nongnu.org Cc: jan.kiszka@siemens.com, froydnj@codesourcery.com, Liu Yu , kvm-ppc@vger.kernel.org, hollisb@us.ibm.com 440(BOOKE) supports 4 hardware breakpoints, while e500 supports 2. Signed-off-by: Liu Yu --- 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