From patchwork Mon Jun 30 15:34:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 365656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BD445140115 for ; Tue, 1 Jul 2014 01:35:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbaF3PfR (ORCPT ); Mon, 30 Jun 2014 11:35:17 -0400 Received: from mail-bl2lp0207.outbound.protection.outlook.com ([207.46.163.207]:4399 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754196AbaF3PfO (ORCPT ); Mon, 30 Jun 2014 11:35:14 -0400 Received: from BY2PR03CA074.namprd03.prod.outlook.com (10.141.249.47) by BY2PR03MB507.namprd03.prod.outlook.com (10.141.143.21) with Microsoft SMTP Server (TLS) id 15.0.974.11; Mon, 30 Jun 2014 15:35:12 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::164) by BY2PR03CA074.outlook.office365.com (2a01:111:e400:2c5d::47) with Microsoft SMTP Server (TLS) id 15.0.974.11 via Frontend Transport; Mon, 30 Jun 2014 15:35:11 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Mon, 30 Jun 2014 15:35:11 +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 s5UFZ0Nj029673; Mon, 30 Jun 2014 08:35:09 -0700 From: Mihai Caraman To: CC: , , Mihai Caraman Subject: [PATCH 6/6 v2] KVM: PPC: Book3E: Enable e6500 core Date: Mon, 30 Jun 2014 18:34:57 +0300 Message-ID: <1404142497-6430-7-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1404142497-6430-1-git-send-email-mihai.caraman@freescale.com> References: <1404142497-6430-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)(199002)(189002)(79102001)(83322001)(77982001)(85852003)(33646001)(85306003)(76482001)(95666004)(19580395003)(19580405001)(44976005)(62966002)(46102001)(50986999)(76176999)(21056001)(99396002)(83072002)(97736001)(89996001)(4396001)(50226001)(88136002)(69596002)(74502001)(77156001)(50466002)(81542001)(105606002)(81342001)(74662001)(104166001)(31966008)(92566001)(92726001)(26826002)(86362001)(93916002)(102836001)(36756003)(84676001)(81156004)(104016002)(48376002)(6806004)(68736004)(106466001)(87936001)(87286001)(107046002)(64706001)(80022001)(47776003)(20776003)(2351001)(229853001)(32563001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB507; 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: X-Forefront-PRVS: 0258E7CCD4 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-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Now that AltiVec support is in place enable e6500 core. Signed-off-by: Mihai Caraman --- v2: - 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 c60b653..0bc9684 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;