From patchwork Tue Aug 5 10:39:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 4677091 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 88BA49F37E for ; Tue, 5 Aug 2014 10:40:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C272220166 for ; Tue, 5 Aug 2014 10:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA5DF2015A for ; Tue, 5 Aug 2014 10:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753459AbaHEKkJ (ORCPT ); Tue, 5 Aug 2014 06:40:09 -0400 Received: from mail-bn1blp0187.outbound.protection.outlook.com ([207.46.163.187]:17452 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753423AbaHEKkE (ORCPT ); Tue, 5 Aug 2014 06:40:04 -0400 Received: from BY2PR03CA069.namprd03.prod.outlook.com (10.141.249.42) by BY2PR03MB506.namprd03.prod.outlook.com (10.141.143.18) with Microsoft SMTP Server (TLS) id 15.0.995.14; Tue, 5 Aug 2014 10:40:01 +0000 Received: from BN1BFFO11FD014.protection.gbl (2a01:111:f400:7c10::1:186) by BY2PR03CA069.outlook.office365.com (2a01:111:e400:2c5d::42) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Tue, 5 Aug 2014 10:39:49 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD014.mail.protection.outlook.com (10.58.144.77) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Tue, 5 Aug 2014 10:39:49 +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 s75Adfak018566; Tue, 5 Aug 2014 03:39:47 -0700 From: Mihai Caraman To: CC: , Mihai Caraman Subject: [PATCH v3 5/5] KVM: PPC: Book3E: Enable e6500 core Date: Tue, 5 Aug 2014 13:39:35 +0300 Message-ID: <1407235175-30994-6-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1407235175-30994-1-git-send-email-mihai.caraman@freescale.com> References: <1407235175-30994-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)(199002)(81342001)(229853001)(64706001)(107046002)(110136001)(76482001)(2351001)(99396002)(31966008)(50986999)(6806004)(44976005)(76176999)(80022001)(104016003)(36756003)(33646002)(48376002)(20776003)(81542001)(47776003)(46102001)(77982001)(79102001)(50466002)(104166001)(85306004)(77156001)(105606002)(74502001)(74662001)(92566001)(83072002)(89996001)(87936001)(92726001)(85852003)(88136002)(95666004)(62966002)(87286001)(86362001)(106466001)(21056001)(68736004)(102836001)(97736001)(84676001)(93916002)(50226001)(26826002)(4396001)(19580395003)(19580405001)(83322001)(32563001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB506; H:tx30smr01.am.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: 02945962BD 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=-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 Now that AltiVec support is in place enable e6500 core. Signed-off-by: Mihai Caraman --- v2-v3: - no changes 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 19dd927..aa48dc3 100644 --- a/arch/powerpc/kvm/e500mc.c +++ b/arch/powerpc/kvm/e500mc.c @@ -177,6 +177,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;