From patchwork Fri May 10 03:14:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 242896 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 0869E2C012A for ; Fri, 10 May 2013 13:15:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521Ab3EJDPI (ORCPT ); Thu, 9 May 2013 23:15:08 -0400 Received: from co9ehsobe003.messaging.microsoft.com ([207.46.163.26]:26795 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363Ab3EJDPH (ORCPT ); Thu, 9 May 2013 23:15:07 -0400 Received: from mail71-co9-R.bigfish.com (10.236.132.239) by CO9EHSOBE041.bigfish.com (10.236.130.104) with Microsoft SMTP Server id 14.1.225.23; Fri, 10 May 2013 03:15:05 +0000 Received: from mail71-co9 (localhost [127.0.0.1]) by mail71-co9-R.bigfish.com (Postfix) with ESMTP id 72E22A04CA; Fri, 10 May 2013 03:15:05 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 11 X-BigFish: VS11(z52aeszzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1155h) Received: from mail71-co9 (localhost.localdomain [127.0.0.1]) by mail71-co9 (MessageSwitch) id 1368155703365163_1794; Fri, 10 May 2013 03:15:03 +0000 (UTC) Received: from CO9EHSMHS023.bigfish.com (unknown [10.236.132.239]) by mail71-co9.bigfish.com (Postfix) with ESMTP id 5656A2E0060; Fri, 10 May 2013 03:15:03 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS023.bigfish.com (10.236.130.33) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 10 May 2013 03:15:03 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.328.11; Fri, 10 May 2013 03:15:12 +0000 Received: from snotra.am.freescale.net ([10.214.85.10]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r4A3Ex2A027770; Thu, 9 May 2013 20:15:00 -0700 From: Scott Wood To: Alexander Graf CC: , , Scott Wood , Mihai Caraman Subject: [PATCH] kvm/ppc/booke64: fix build breakage from Altivec, and disable e6500 Date: Thu, 9 May 2013 22:14:58 -0500 Message-ID: <1368155698-15784-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org BookE altivec support brought two new exceptions, but KVM was not updated, so the build broke for all 64-bit booke with KVM enabled. Add the new vectors, but there's more than this required to make Altivec work in the guest, and we can't prevent the guest from turning on Altivec (which can corrupt host state until state save/restore is implemented). Disable e6500 on KVM until this is fixed. Signed-off-by: Scott Wood Cc: Mihai Caraman --- arch/powerpc/kvm/bookehv_interrupts.S | 4 ++++ arch/powerpc/kvm/e500mc.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index e8ed7d6..6397613 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/arch/powerpc/kvm/bookehv_interrupts.S @@ -309,6 +309,10 @@ kvm_handler BOOKE_INTERRUPT_DOORBELL_CRITICAL, EX_PARAMS(CRIT), \ SPRN_CSRR0, SPRN_CSRR1, 0 kvm_handler BOOKE_INTERRUPT_HV_PRIV, EX_PARAMS(GEN), \ SPRN_SRR0, SPRN_SRR1, NEED_EMU +kvm_handler BOOKE_INTERRUPT_ALTIVEC_UNAVAIL, EX_PARAMS(GEN), \ + SPRN_SRR0, SPRN_SRR1, 0 +kvm_handler BOOKE_INTERRUPT_ALTIVEC_ASSIST, EX_PARAMS(GEN), \ + SPRN_SRR0, SPRN_SRR1, 0 kvm_handler BOOKE_INTERRUPT_HV_SYSCALL, EX_PARAMS(GEN), \ SPRN_SRR0, SPRN_SRR1, 0 kvm_handler BOOKE_INTERRUPT_GUEST_DBELL, EX_PARAMS(GDBELL), \ diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c index 753cc99..19c8379 100644 --- a/arch/powerpc/kvm/e500mc.c +++ b/arch/powerpc/kvm/e500mc.c @@ -177,8 +177,6 @@ int kvmppc_core_check_processor_compat(void) r = 0; else if (strcmp(cur_cpu_spec->cpu_name, "e5500") == 0) r = 0; - else if (strcmp(cur_cpu_spec->cpu_name, "e6500") == 0) - r = 0; else r = -ENOTSUPP;