From patchwork Wed Aug 6 06:38:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 4683761 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 720619F37E for ; Wed, 6 Aug 2014 06:41:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96E4020117 for ; Wed, 6 Aug 2014 06:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C27BE20115 for ; Wed, 6 Aug 2014 06:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754809AbaHFGlt (ORCPT ); Wed, 6 Aug 2014 02:41:49 -0400 Received: from mail-by2lp0237.outbound.protection.outlook.com ([207.46.163.237]:16315 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753262AbaHFGlr (ORCPT ); Wed, 6 Aug 2014 02:41:47 -0400 Received: from BY2PR03MB572.namprd03.prod.outlook.com (10.141.143.152) by BY2PR03MB345.namprd03.prod.outlook.com (10.141.139.11) with Microsoft SMTP Server (TLS) id 15.0.1005.8; Wed, 6 Aug 2014 06:41:45 +0000 Received: from BY2PR03CA050.namprd03.prod.outlook.com (10.141.249.23) by BY2PR03MB572.namprd03.prod.outlook.com (10.141.143.152) with Microsoft SMTP Server (TLS) id 15.0.995.14; Wed, 6 Aug 2014 06:41:42 +0000 Received: from BY2FFO11FD034.protection.gbl (2a01:111:f400:7c0c::101) by BY2PR03CA050.outlook.office365.com (2a01:111:e400:2c5d::23) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Wed, 6 Aug 2014 06:41:42 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD034.mail.protection.outlook.com (10.1.14.219) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Wed, 6 Aug 2014 06:41:42 +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 s766fVYB024194; Tue, 5 Aug 2014 23:41:40 -0700 From: Bharat Bhushan To: , CC: , , , Bharat Bhushan Subject: [PATCH 3/7 v3] KVM: PPC: BOOKE: Allow guest to change MSR_DE Date: Wed, 6 Aug 2014 12:08:53 +0530 Message-ID: <1407307137-5083-4-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)(86362001)(6806004)(74662001)(31966008)(93916002)(229853001)(74502001)(19580405001)(44976005)(105606002)(19580395003)(85306004)(81156004)(4396001)(106466001)(50226001)(104016003)(107046002)(87286001)(62966002)(76176999)(99396002)(46102001)(47776003)(20776003)(50986999)(76482001)(84676001)(36756003)(104166001)(26826002)(88136002)(89996001)(102836001)(77156001)(85852003)(83072002)(92566001)(92726001)(48376002)(81342001)(87936001)(97736001)(81542001)(79102001)(80022001)(83322001)(95666004)(64706001)(77982001)(69596002)(68736004)(21056001)(50466002); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB572; 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:UriScan:; 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-Microsoft-Antispam: BCL:0;PCL:0;RULEID:; 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 This patch changes the default behavior of MSRP_DEP, that is guest is not allowed to change the MSR_DE, to guest can change MSR_DE. When userspace is debugging guest then it override the default behavior and set MSRP_DEP. This stops guest to change MSR_DE when userspace is debugging guest. Signed-off-by: Bharat Bhushan --- v2->v3 - No change arch/powerpc/kvm/e500mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c index 164bad2..000cf82 100644 --- a/arch/powerpc/kvm/e500mc.c +++ b/arch/powerpc/kvm/e500mc.c @@ -194,7 +194,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) #ifdef CONFIG_64BIT vcpu->arch.shadow_epcr |= SPRN_EPCR_ICM; #endif - vcpu->arch.shadow_msrp = MSRP_UCLEP | MSRP_DEP | MSRP_PMMP; + vcpu->arch.shadow_msrp = MSRP_UCLEP | MSRP_PMMP; vcpu->arch.eplc = EPC_EGS | (vcpu->kvm->arch.lpid << EPC_ELPID_SHIFT); vcpu->arch.epsc = vcpu->arch.eplc;