From patchwork Wed Aug 6 06:38:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 4683741 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 13F0FC0338 for ; Wed, 6 Aug 2014 06:41:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36B7A2011D for ; Wed, 6 Aug 2014 06:41:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8215320115 for ; Wed, 6 Aug 2014 06:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476AbaHFGln (ORCPT ); Wed, 6 Aug 2014 02:41:43 -0400 Received: from dns-bn1lp0143.outbound.protection.outlook.com ([207.46.163.143]:59139 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750883AbaHFGlm (ORCPT ); Wed, 6 Aug 2014 02:41:42 -0400 Received: from BN3PR0301CA0027.namprd03.prod.outlook.com (25.160.180.165) by DM2PR0301MB0734.namprd03.prod.outlook.com (25.160.97.142) with Microsoft SMTP Server (TLS) id 15.0.995.14; Wed, 6 Aug 2014 06:41:39 +0000 Received: from BN1BFFO11FD054.protection.gbl (2a01:111:f400:7c10::1:166) by BN3PR0301CA0027.outlook.office365.com (2a01:111:e400:4000::37) with Microsoft SMTP Server (TLS) id 15.0.1005.10 via Frontend Transport; Wed, 6 Aug 2014 06:41:38 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD054.mail.protection.outlook.com (10.58.145.9) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Wed, 6 Aug 2014 06:41:38 +0000 Received: from kvm.ap.freescale.net (kvm.ap.freescale.net [10.232.14.24]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s766fVY9024194; Tue, 5 Aug 2014 23:41:34 -0700 From: Bharat Bhushan To: , CC: , , , Bharat Bhushan Subject: [PATCH 1/7 v3] KVM: PPC: BOOKE: allow debug interrupt at "debug level" Date: Wed, 6 Aug 2014 12:08:51 +0530 Message-ID: <1407307137-5083-2-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1407307137-5083-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1407307137-5083-1-git-send-email-Bharat.Bhushan@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(104166001)(76482001)(76176999)(50986999)(46102001)(21056001)(92726001)(99396002)(36756003)(80022001)(20776003)(47776003)(64706001)(102836001)(74502001)(50466002)(74662001)(95666004)(62966002)(31966008)(50226001)(85306004)(4396001)(81156004)(106466001)(105606002)(97736001)(77156001)(81342001)(44976005)(6806004)(107046002)(19580405001)(19580395003)(83322001)(229853001)(86362001)(48376002)(93916002)(77982001)(104016003)(85852003)(26826002)(83072002)(87936001)(87286001)(89996001)(68736004)(84676001)(69596002)(81542001)(92566001)(79102001)(88136002); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR0301MB0734; H:az84smr01.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: 02951C14DC Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.6 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 --- v2->v3 - No change 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 b4c89fa..322da7d 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -377,7 +377,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; }