From patchwork Mon Aug 4 08:02:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 4667361 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A09AD9F373 for ; Mon, 4 Aug 2014 08:05:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F80B200D9 for ; Mon, 4 Aug 2014 08:05:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAA83201CD for ; Mon, 4 Aug 2014 08:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716AbaHDIFn (ORCPT ); Mon, 4 Aug 2014 04:05:43 -0400 Received: from mail-bl2lp0205.outbound.protection.outlook.com ([207.46.163.205]:15228 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751706AbaHDIFl (ORCPT ); Mon, 4 Aug 2014 04:05:41 -0400 Received: from BN3PR0301CA0071.namprd03.prod.outlook.com (25.160.152.167) by DM2PR0301MB0735.namprd03.prod.outlook.com (25.160.97.143) with Microsoft SMTP Server (TLS) id 15.0.995.14; Mon, 4 Aug 2014 08:05:20 +0000 Received: from BL2FFO11FD019.protection.gbl (2a01:111:f400:7c09::129) by BN3PR0301CA0071.outlook.office365.com (2a01:111:e400:401e::39) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Mon, 4 Aug 2014 08:05:19 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD019.mail.protection.outlook.com (10.173.161.37) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Mon, 4 Aug 2014 08:05:19 +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 s7485CI8002141; Mon, 4 Aug 2014 01:05:16 -0700 From: Bharat Bhushan To: , CC: , , , Bharat Bhushan Subject: [PATCH 1/5 v2] KVM: PPC: BOOKE: allow debug interrupt at "debug level" Date: Mon, 4 Aug 2014 13:32:39 +0530 Message-ID: <1407139363-25598-2-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1407139363-25598-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1407139363-25598-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)(74502001)(21056001)(107046002)(69596002)(50466002)(79102001)(6806004)(76176999)(99396002)(19580395003)(85852003)(229853001)(83072002)(76482001)(44976005)(85306004)(62966002)(97736001)(26826002)(95666004)(92566001)(50226001)(87286001)(4396001)(88136002)(77156001)(50986999)(68736004)(87936001)(105606002)(83322001)(48376002)(77982001)(102836001)(36756003)(46102001)(104016003)(104166001)(106466001)(81542001)(31966008)(93916002)(92726001)(89996001)(84676001)(64706001)(20776003)(47776003)(19580405001)(81342001)(86362001)(74662001)(80022001)(81156004); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR0301MB0735; 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: 0293D40691 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 --- v1->v2 - 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; }