From patchwork Fri Jun 27 06:25:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 4433621 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 2637B9F319 for ; Fri, 27 Jun 2014 06:26:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D98B2039D for ; Fri, 27 Jun 2014 06:26:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 748BE20320 for ; Fri, 27 Jun 2014 06:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbaF0G0m (ORCPT ); Fri, 27 Jun 2014 02:26:42 -0400 Received: from mail-bl2lp0212.outbound.protection.outlook.com ([207.46.163.212]:7610 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752492AbaF0G0l (ORCPT ); Fri, 27 Jun 2014 02:26:41 -0400 Received: from DM2PR03CA007.namprd03.prod.outlook.com (10.141.52.155) by DM2PR03MB574.namprd03.prod.outlook.com (10.141.84.150) with Microsoft SMTP Server (TLS) id 15.0.954.9; Fri, 27 Jun 2014 06:26:20 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::162) by DM2PR03CA007.outlook.office365.com (2a01:111:e400:2414::27) with Microsoft SMTP Server (TLS) id 15.0.959.24 via Frontend Transport; Fri, 27 Jun 2014 06:26:19 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Fri, 27 Jun 2014 06:26: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 s5R6QDje029441; Thu, 26 Jun 2014 23:26:17 -0700 From: Bharat Bhushan To: CC: , , , Bharat Bhushan Subject: [PATCH 1/2] KVM: powerpc/booke: allow debug interrupt at "debug level" Date: Fri, 27 Jun 2014 11:55:05 +0530 Message-ID: <1403850306-12394-2-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1403850306-12394-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1403850306-12394-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)(80022001)(64706001)(81342001)(76176999)(19580395003)(47776003)(50986999)(79102001)(77982001)(4396001)(50226001)(85306003)(74502001)(74662001)(50466002)(81542001)(31966008)(20776003)(76482001)(46102001)(21056001)(19580405001)(68736004)(6806004)(69596002)(99396002)(93916002)(77156001)(83322001)(86362001)(92566001)(36756003)(48376002)(44976005)(95666004)(92726001)(97736001)(84676001)(102836001)(107046002)(106466001)(26826002)(105606002)(62966002)(87936001)(87286001)(89996001)(83072002)(104166001)(88136002)(104016002)(81156004)(85852003)(2351001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR03MB574; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BL:0; ACTION:Default; RISK:Low; SCL:0; SPMLVL:NotSpam; PCL:0; RULEID: X-Forefront-PRVS: 0255DF69B9 Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 ab62109..bb25937 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; }