From patchwork Mon Sep 1 09:01:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 384720 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 693951401B1 for ; Mon, 1 Sep 2014 19:02:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752746AbaIAJC3 (ORCPT ); Mon, 1 Sep 2014 05:02:29 -0400 Received: from mail-bl2lp0207.outbound.protection.outlook.com ([207.46.163.207]:44612 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752570AbaIAJC1 (ORCPT ); Mon, 1 Sep 2014 05:02:27 -0400 Received: from CH1PR03CA002.namprd03.prod.outlook.com (10.255.156.147) by DM2PR03MB510.namprd03.prod.outlook.com (10.141.87.15) with Microsoft SMTP Server (TLS) id 15.0.1019.16; Mon, 1 Sep 2014 09:02:06 +0000 Received: from BN1BFFO11FD046.protection.gbl (10.255.156.132) by CH1PR03CA002.outlook.office365.com (10.255.156.147) with Microsoft SMTP Server (TLS) id 15.0.1019.16 via Frontend Transport; Mon, 1 Sep 2014 09:02:05 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD046.mail.protection.outlook.com (10.58.145.1) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Mon, 1 Sep 2014 09:02:05 +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 s819229S006885; Mon, 1 Sep 2014 02:02:04 -0700 From: Mihai Caraman To: CC: , Mihai Caraman Subject: [PATCH v2 2/2] KVM: PPC: Book3E: Enable e6500 core Date: Mon, 1 Sep 2014 12:01:59 +0300 Message-ID: <1409562119-11090-2-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1409562119-11090-1-git-send-email-mihai.caraman@freescale.com> References: <1409562119-11090-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)(199003)(105606002)(107046002)(81542001)(62966002)(95666004)(81342001)(106466001)(81156004)(21056001)(110136001)(2351001)(46102001)(229853001)(76482001)(80022001)(87286001)(83322001)(84676001)(85306004)(104166001)(69596002)(33646002)(68736004)(20776003)(77982001)(64706001)(97736001)(47776003)(79102001)(104016003)(44976005)(6806004)(26826002)(102836001)(36756003)(74662001)(31966008)(92566001)(99396002)(19580405001)(92726001)(85852003)(89996001)(19580395003)(93916002)(90102001)(87936001)(77156001)(50226001)(74502001)(50466002)(86362001)(48376002)(76176999)(4396001)(83072002)(88136002)(50986999)(32563001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR03MB510; 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:;UriScan:; X-Forefront-PRVS: 03218BFD9F 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=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 and hardware thread support is in place enable e6500 core. Signed-off-by: Mihai Caraman --- v2: - new patch 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;