From patchwork Fri Aug 29 17:03:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 4811871 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 AC6629F2A9 for ; Fri, 29 Aug 2014 17:20:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE69920125 for ; Fri, 29 Aug 2014 17:20:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF3F3200D9 for ; Fri, 29 Aug 2014 17:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753968AbaH2RUO (ORCPT ); Fri, 29 Aug 2014 13:20:14 -0400 Received: from [207.46.163.144] ([207.46.163.144]:35566 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753819AbaH2RUN (ORCPT ); Fri, 29 Aug 2014 13:20:13 -0400 Received: from BN3PR0301CA0036.namprd03.prod.outlook.com (25.160.180.174) by DM2PR03MB511.namprd03.prod.outlook.com (10.141.87.19) with Microsoft SMTP Server (TLS) id 15.0.1019.16; Fri, 29 Aug 2014 17:04:01 +0000 Received: from BL2FFO11FD029.protection.gbl (2a01:111:f400:7c09::159) by BN3PR0301CA0036.outlook.office365.com (2a01:111:e400:4000::46) with Microsoft SMTP Server (TLS) id 15.0.1019.16 via Frontend Transport; Fri, 29 Aug 2014 17:04:00 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD029.mail.protection.outlook.com (10.173.160.69) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Fri, 29 Aug 2014 17:04:00 +0000 Received: from fsr-fed1764-012.ea.freescale.net (fsr-fed1764-012-010171073213.ea.freescale.net [10.171.73.213]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s7TH3ubI017199; Fri, 29 Aug 2014 10:03:58 -0700 From: Mihai Caraman To: CC: , Mihai Caraman Subject: [PATCH 2/2] KVM: PPC: Book3E: Enable e6500 core Date: Fri, 29 Aug 2014 20:03:53 +0300 Message-ID: <1409331833-2932-2-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1409331833-2932-1-git-send-email-mihai.caraman@freescale.com> References: <1409331833-2932-1-git-send-email-mihai.caraman@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199003)(92566001)(83072002)(92726001)(89996001)(88136002)(87936001)(85852003)(74662001)(74502001)(26826002)(31966008)(81342001)(87286001)(19580395003)(102836001)(19580405001)(83322001)(84676001)(81542001)(68736004)(6806004)(44976005)(95666004)(105606002)(77156001)(79102001)(110136001)(77982001)(229853001)(106466001)(107046002)(2351001)(46102001)(76482001)(36756003)(104016003)(62966002)(21056001)(48376002)(104166001)(85306004)(50226001)(4396001)(33646002)(90102001)(50466002)(99396002)(64706001)(50986999)(47776003)(20776003)(80022001)(97736001)(76176999)(86362001)(93916002)(32563001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR03MB511; H:tx30smr01.am.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:;UriScan:; X-Forefront-PRVS: 0318501FAE Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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, 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 Now that AltiVec and hardware threading support are in place enable e6500 core. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/e500mc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c index bf8f99f..2fdc872 100644 --- a/arch/powerpc/kvm/e500mc.c +++ b/arch/powerpc/kvm/e500mc.c @@ -180,6 +180,16 @@ int kvmppc_core_check_processor_compat(void) r = 0; else if (strcmp(cur_cpu_spec->cpu_name, "e5500") == 0) r = 0; +#ifdef CONFIG_ALTIVEC + /* + * Since guests have the priviledge to enable AltiVec, we need AltiVec + * support in the host to save/restore their context. + * Don't use CPU_FTR_ALTIVEC to identify cores with AltiVec unit + * because it's cleared in the absence of CONFIG_ALTIVEC! + */ + else if (strcmp(cur_cpu_spec->cpu_name, "e6500") == 0) + r = 0; +#endif else r = -ENOTSUPP;