Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756897Ab3FGXeW (ORCPT ); Fri, 7 Jun 2013 19:34:22 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:32976 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756005Ab3FGXeV (ORCPT ); Fri, 7 Jun 2013 19:34:21 -0400 Message-ID: <51B26E02.8070802@cogentembedded.com> Date: Sat, 08 Jun 2013 03:34:26 +0400 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: David Daney CC: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal , linux-kernel@vger.kernel.org, David Daney Subject: Re: [PATCH 20/31] mips/kvm: Hook into TLB fault handlers. References: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com> <1370646215-6543-21-git-send-email-ddaney.cavm@gmail.com> In-Reply-To: <1370646215-6543-21-git-send-email-ddaney.cavm@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1183 Lines: 41 Hello. On 06/08/2013 03:03 AM, David Daney wrote: > From: David Daney > > If the CPU is operating in guest mode when a TLB related excpetion > occurs, give KVM a chance to do emulation. > > Signed-off-by: David Daney > --- > arch/mips/mm/fault.c | 8 ++++++++ > arch/mips/mm/tlbex-fault.S | 6 ++++++ > 2 files changed, 14 insertions(+) > > diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c > index 0fead53..9391da49 100644 > --- a/arch/mips/mm/fault.c > +++ b/arch/mips/mm/fault.c [...] > @@ -50,6 +51,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ > field, regs->cp0_epc); > #endif > > +#ifdef CONFIG_KVM_MIPSVZ > + if (test_tsk_thread_flag(current, TIF_GUESTMODE)) { > + if (mipsvz_page_fault(regs, write, address)) Any reason not to collapse these into single *if*? > + return; > + } > +#endif > + > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/