From patchwork Thu Jul 3 14:45:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 4474611 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 122ECBEEAA for ; Thu, 3 Jul 2014 14:46:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AE8C20251 for ; Thu, 3 Jul 2014 14:45:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DE512021A for ; Thu, 3 Jul 2014 14:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757834AbaGCOpz (ORCPT ); Thu, 3 Jul 2014 10:45:55 -0400 Received: from mail-bl2lp0209.outbound.protection.outlook.com ([207.46.163.209]:29963 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756749AbaGCOpy (ORCPT ); Thu, 3 Jul 2014 10:45:54 -0400 Received: from BN3PR0301CA0076.namprd03.prod.outlook.com (25.160.152.172) by BY2PR03MB508.namprd03.prod.outlook.com (10.141.143.27) with Microsoft SMTP Server (TLS) id 15.0.959.24; Thu, 3 Jul 2014 14:45:39 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::142) by BN3PR0301CA0076.outlook.office365.com (2a01:111:e400:401e::44) with Microsoft SMTP Server (TLS) id 15.0.974.11 via Frontend Transport; Thu, 3 Jul 2014 14:45:39 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Thu, 3 Jul 2014 14:45:38 +0000 Received: from fsr-fed1764-012.ea.freescale.net (fsr-fed1764-012-010171073213.ea.freescale.net [10.171.73.213]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s63EjUPp021710; Thu, 3 Jul 2014 07:45:36 -0700 From: Mihai Caraman To: CC: , , Mihai Caraman Subject: [RFC PATCH 4/4] KVM: PPC: e500mc: Advertise E.PT to support HTW guests Date: Thu, 3 Jul 2014 17:45:27 +0300 Message-ID: <1404398727-12844-5-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1404398727-12844-1-git-send-email-mihai.caraman@freescale.com> References: <1404398727-12844-1-git-send-email-mihai.caraman@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)(189002)(199002)(107046002)(62966002)(33646001)(2351001)(47776003)(79102001)(105606002)(64706001)(74502001)(77156001)(36756003)(81542001)(81342001)(229853001)(106466001)(109986001)(21056001)(81156004)(80022001)(46102001)(88136002)(95666004)(20776003)(6806004)(104016002)(31966008)(93916002)(69596002)(76482001)(68736004)(86362001)(575784001)(87936001)(4396001)(44976005)(50226001)(83322001)(19580405001)(92566001)(92726001)(19580395003)(50466002)(85852003)(48376002)(87286001)(97736001)(74662001)(89996001)(85306003)(50986999)(104166001)(76176999)(26826002)(83072002)(77982001)(102836001)(99396002)(84676001)(217873001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB508; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0261CCEEDF 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=mihai.caraman@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 Enable E.PT for vcpus with MMU MAV 2.0 to support Hardware Page Tablewalk (HTW) in guests. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/e500_mmu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c index b775e6a..1de0cd6 100644 --- a/arch/powerpc/kvm/e500_mmu.c +++ b/arch/powerpc/kvm/e500_mmu.c @@ -945,11 +945,7 @@ static int vcpu_mmu_init(struct kvm_vcpu *vcpu, vcpu->arch.tlbps[1] = mfspr(SPRN_TLB1PS); vcpu->arch.mmucfg &= ~MMUCFG_LRAT; - - /* Guest mmu emulation currently doesn't handle E.PT */ - vcpu->arch.eptcfg = 0; - vcpu->arch.tlbcfg[0] &= ~TLBnCFG_PT; - vcpu->arch.tlbcfg[1] &= ~TLBnCFG_IND; + vcpu->arch.eptcfg = mfspr(SPRN_EPTCFG); } return 0;