From patchwork Tue Aug 4 09:36:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Yu-B13201 X-Patchwork-Id: 30718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4A170B7063 for ; Tue, 4 Aug 2009 19:54:56 +1000 (EST) Received: from localhost ([127.0.0.1]:43860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYGjL-00076p-LH for incoming@patchwork.ozlabs.org; Tue, 04 Aug 2009 05:54:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYGYj-0003dd-Cx for qemu-devel@nongnu.org; Tue, 04 Aug 2009 05:43:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYGYd-0003Zk-PE for qemu-devel@nongnu.org; Tue, 04 Aug 2009 05:43:52 -0400 Received: from [199.232.76.173] (port=60391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYGYd-0003ZJ-9f for qemu-devel@nongnu.org; Tue, 04 Aug 2009 05:43:47 -0400 Received: from az33egw02.freescale.net ([192.88.158.103]:36315) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYGYb-00021X-Pt for qemu-devel@nongnu.org; Tue, 04 Aug 2009 05:43:46 -0400 Received: from de01smr01.freescale.net (de01smr01.freescale.net [10.208.0.31]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id n749fe1k009614 for ; Tue, 4 Aug 2009 02:41:50 -0700 (MST) Received: from zch01exm26.fsl.freescale.net (zch01exm26.ap.freescale.net [10.192.129.221]) by de01smr01.freescale.net (8.13.1/8.13.0) with ESMTP id n749fvhG008366 for ; Tue, 4 Aug 2009 04:42:05 -0500 (CDT) Received: from localhost ([10.193.20.106]) by zch01exm26.fsl.freescale.net with Microsoft SMTPSVC(6.0.3790.3959); Tue, 4 Aug 2009 17:41:31 +0800 From: Liu Yu To: qemu-devel@nongnu.org Date: Tue, 4 Aug 2009 17:36:08 +0800 Message-Id: <1249378568-18008-6-git-send-email-yu.liu@freescale.com> X-Mailer: git-send-email 1.5.4 In-Reply-To: <1249378568-18008-5-git-send-email-yu.liu@freescale.com> 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> X-OriginalArrivalTime: 04 Aug 2009 09:41:31.0586 (UTC) FILETIME=[BF790220:01CA14E7] X-Brightmail-Tracker: AAAAAQAAAWE= X-detected-operating-system: by monty-python.gnu.org: Solaris 8 (1) Cc: jan.kiszka@siemens.com, froydnj@codesourcery.com, Liu Yu , kvm-ppc@vger.kernel.org, hollisb@us.ibm.com Subject: [Qemu-devel] [PATCH 5/5] kvmppc: guest debug init X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }