From patchwork Fri Jun 28 09:20:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Caraman X-Patchwork-Id: 255316 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 7187D2C02BA for ; Fri, 28 Jun 2013 19:20:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754841Ab3F1JUS (ORCPT ); Fri, 28 Jun 2013 05:20:18 -0400 Received: from mail-db8lp0186.outbound.messaging.microsoft.com ([213.199.154.186]:58199 "EHLO db8outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754736Ab3F1JUQ (ORCPT ); Fri, 28 Jun 2013 05:20:16 -0400 Received: from mail155-db8-R.bigfish.com (10.174.8.228) by DB8EHSOBE028.bigfish.com (10.174.4.91) with Microsoft SMTP Server id 14.1.225.23; Fri, 28 Jun 2013 09:20:14 +0000 Received: from mail155-db8 (localhost [127.0.0.1]) by mail155-db8-R.bigfish.com (Postfix) with ESMTP id 4EDE81203DD; Fri, 28 Jun 2013 09:20:14 +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(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1155h) Received: from mail155-db8 (localhost.localdomain [127.0.0.1]) by mail155-db8 (MessageSwitch) id 1372411212833244_29673; Fri, 28 Jun 2013 09:20:12 +0000 (UTC) Received: from DB8EHSMHS006.bigfish.com (unknown [10.174.8.231]) by mail155-db8.bigfish.com (Postfix) with ESMTP id C7D723C0048; Fri, 28 Jun 2013 09:20:12 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB8EHSMHS006.bigfish.com (10.174.4.16) with Microsoft SMTP Server (TLS) id 14.16.227.3; Fri, 28 Jun 2013 09:20:12 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Fri, 28 Jun 2013 09:20:09 +0000 Received: from mcaraman-VirtualBox.ea.freescale.net (mcaraman-VirtualBox.ea.freescale.net [10.171.73.70]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r5S9K7FQ010935; Fri, 28 Jun 2013 02:20:08 -0700 From: Mihai Caraman To: CC: , , Mihai Caraman Subject: [PATCH 1/2] KVM: PPC: e500mc: Revert "add load inst fixup" Date: Fri, 28 Jun 2013 12:20:02 +0300 Message-ID: <1372411203-14795-1-git-send-email-mihai.caraman@freescale.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org lwepx faults needs to be handled by KVM. With the current solution the host kernel searches for the faulting address using its LPID context. If a host translation is found we return to the lwepx instr 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 --- Resend this patch for Alex G. he was unsubscribed from kvm-ppc mailist for a while. 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