From patchwork Thu Feb 20 16:30:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 322252 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 CE03D2C00C0 for ; Fri, 21 Feb 2014 03:30:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbaBTQaj (ORCPT ); Thu, 20 Feb 2014 11:30:39 -0500 Received: from va3ehsobe004.messaging.microsoft.com ([216.32.180.14]:39413 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753552AbaBTQai (ORCPT ); Thu, 20 Feb 2014 11:30:38 -0500 Received: from mail7-va3-R.bigfish.com (10.7.14.229) by VA3EHSOBE010.bigfish.com (10.7.40.12) with Microsoft SMTP Server id 14.1.225.22; Thu, 20 Feb 2014 16:30:37 +0000 Received: from mail7-va3 (localhost [127.0.0.1]) by mail7-va3-R.bigfish.com (Postfix) with ESMTP id 393E960158; Thu, 20 Feb 2014 16:30:37 +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: 0 X-BigFish: VS0(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6hzz1de098h8275bh1de097hz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh1155h) Received: from mail7-va3 (localhost.localdomain [127.0.0.1]) by mail7-va3 (MessageSwitch) id 139291383534257_10721; Thu, 20 Feb 2014 16:30:35 +0000 (UTC) Received: from VA3EHSMHS023.bigfish.com (unknown [10.7.14.230]) by mail7-va3.bigfish.com (Postfix) with ESMTP id F419A16004D; Thu, 20 Feb 2014 16:30:34 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS023.bigfish.com (10.7.99.33) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 20 Feb 2014 16:30:31 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.3.158.2; Thu, 20 Feb 2014 16:30:31 +0000 Received: from fsr-fed1364-13.ea.freescale.net (fsr-fed1364-13.ea.freescale.net [10.171.81.124]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s1KGUOIO009773; Thu, 20 Feb 2014 09:30:27 -0700 From: Mihai Caraman To: CC: , , Mihai Caraman Subject: [PATCH 1/4] KVM: PPC: e500mc: Revert "add load inst fixup" Date: Thu, 20 Feb 2014 18:30:18 +0200 Message-ID: <1392913821-4520-1-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Load external pid (lwepx) execution faults, generated by KVM accessing guest contexts, needs to be handled by KVM. In the current implementation the host kernel handles lwepx faults, searching for the faulting address with its own Logical Partition ID (LPID) context! In case a host translation is found, the execution returns to the lwepx instruction instead of the fixup ending up in an infinite loop. Revert the commit 1d628af7 "add load inst fixup". We will address lwepx issue in a subsequent patch without the need of fixups. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/bookehv_interrupts.S | 26 +------------------------- 1 files changed, 1 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index e8ed7d6..20c7a54 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/arch/powerpc/kvm/bookehv_interrupts.S @@ -29,7 +29,6 @@ #include #include #include -#include #ifdef CONFIG_64BIT #include @@ -162,32 +161,9 @@ PPC_STL r30, VCPU_GPR(R30)(r4) PPC_STL r31, VCPU_GPR(R31)(r4) mtspr SPRN_EPLC, r8 - - /* disable preemption, so we are sure we hit the fixup handler */ - CURRENT_THREAD_INFO(r8, r1) - li r7, 1 - stw r7, TI_PREEMPT(r8) - isync - - /* - * In case the read goes wrong, we catch it and write an invalid value - * in LAST_INST instead. - */ -1: lwepx r9, 0, r5 -2: -.section .fixup, "ax" -3: li r9, KVM_INST_FETCH_FAILED - b 2b -.previous -.section __ex_table,"a" - PPC_LONG_ALIGN - PPC_LONG 1b,3b -.previous - + lwepx r9, 0, r5 mtspr SPRN_EPLC, r3 - li r7, 0 - stw r7, TI_PREEMPT(r8) stw r9, VCPU_LAST_INST(r4) .endif