From patchwork Fri Jul 11 08:38:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 4531791 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1514CBEEAA for ; Fri, 11 Jul 2014 08:41:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 419FE201D5 for ; Fri, 11 Jul 2014 08:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5FD58200C6 for ; Fri, 11 Jul 2014 08:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbaGKIlM (ORCPT ); Fri, 11 Jul 2014 04:41:12 -0400 Received: from mail-bl2lp0209.outbound.protection.outlook.com ([207.46.163.209]:36172 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752469AbaGKIlG (ORCPT ); Fri, 11 Jul 2014 04:41:06 -0400 Received: from DM2PR03CA006.namprd03.prod.outlook.com (10.141.52.154) by DM2PR03MB399.namprd03.prod.outlook.com (10.141.84.148) with Microsoft SMTP Server (TLS) id 15.0.974.11; Fri, 11 Jul 2014 08:40:51 +0000 Received: from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::111) by DM2PR03CA006.outlook.office365.com (2a01:111:e400:2414::26) with Microsoft SMTP Server (TLS) id 15.0.985.8 via Frontend Transport; Fri, 11 Jul 2014 08:40:50 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Fri, 11 Jul 2014 08:40:50 +0000 Received: from kvm.ap.freescale.net (kvm.ap.freescale.net [10.232.14.24]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s6B8ec3O030811; Fri, 11 Jul 2014 01:40:47 -0700 From: Bharat Bhushan To: , CC: , , , Bharat Bhushan Subject: [PATCH 3/6] KVM: PPC: BOOKE: allow debug interrupt at "debug level" Date: Fri, 11 Jul 2014 14:08:58 +0530 Message-ID: <1405067941-27134-4-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405067941-27134-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1405067941-27134-1-git-send-email-Bharat.Bhushan@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(6806004)(4396001)(102836001)(87936001)(104166001)(107046002)(76176999)(44976005)(104016003)(68736004)(79102001)(77982001)(36756003)(21056001)(92566001)(48376002)(97736001)(89996001)(88136002)(31966008)(95666004)(50226001)(50466002)(106466001)(74502001)(85306003)(81542001)(47776003)(92726001)(77156001)(46102001)(19580395003)(64706001)(26826002)(20776003)(87286001)(83072002)(76482001)(50986999)(85852003)(99396002)(81342001)(105606002)(19580405001)(93916002)(80022001)(84676001)(74662001)(62966002)(83322001)(229853001)(86362001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR03MB399; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 02698DF457 Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Bharat.Bhushan@freescale.com; X-OriginatorOrg: freescale.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Debug interrupt can be either "critical level" or "debug level". There are separate set of save/restore registers used for different level. Example: DSRR0/DSRR1 are used for "debug level" and CSRR0/CSRR1 are used for critical level debug interrupt. Using CPU_FTR_DEBUG_LVL_EXC to decide which interrupt level to be used. Signed-off-by: Bharat Bhushan --- arch/powerpc/kvm/booke.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index a5ee42c..fadfe76 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -424,7 +424,11 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, allowed = vcpu->arch.shared->msr & MSR_DE; allowed = allowed && !crit; msr_mask = MSR_ME; - int_class = INT_CLASS_CRIT; + if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC)) + int_class = INT_CLASS_DBG; + else + int_class = INT_CLASS_CRIT; + break; }