Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5369694yba; Mon, 13 May 2019 09:41:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9rUYloODh/LYaA78tdO7BWVY7ARNzYx6gmuaoNKRMexWojqTetBN1Ci7P7HVbX+JFqsVC X-Received: by 2002:a62:b508:: with SMTP id y8mr34699743pfe.113.1557765688030; Mon, 13 May 2019 09:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557765688; cv=none; d=google.com; s=arc-20160816; b=ya5AiAnExU7F3KbPywrK0QVrOtJluCQd5F6GuUkddzl9MDP1Z9psQZH0nQ4wE80cgl 6qjUP7AgAH9nBJcSr+E7HXzXTxbqQG1rS/Y3CT8Q4UM/dZLsvUgFgaJ/94kqxIpPwref QOhCiViOaHw83Y4jr7iCM1/SHLhlTcs9xBHPr1Q8/dVVEA6lqFELW+EhECXo0DdsCJiW o0/BzykRvKehIHZAdZiJq1u5NBssD/DICS5eDyWxQ4DCrSHFJh17C0Pfwcm8BbEvbL0j 3OahPR98NcpTuJNOz0/TBdKC3a3x/asE5InlmyEOaX5ORAcOc/d0ehydXaqszMRntw3g xLHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sYk1qF0Vg/KIRkZli5M/2CG/IiUILwRXwJH2skE3G4Y=; b=rGqq9a3WjPOsAgHKL4PKtjnGCtDWS+Q/qY7drRHkmM3PZiLLmzYOQ4JUYSdO7vlbJ+ aSnOyZlDgpwd6HpufurWLmtvw3Ksa3HmCltLyyEnI9qvN3xuf0Gz2kwQ4zFLqAzJlekl u5qL0Dzq6/OJRMRyXKCtFMk3EZPk/OHJPH4IHl3Iza3rfAGSQJnW3Ras9mtjPpLJGcWL 3psyV5hkcMpyUnk5+UfBlRK5Pti60o9SUcOJ6nEYAfJArZilGva2P+Xzvl/2zOCm7tKv sd2WlA61q1b5xRpOqCPdg03zJDyHhDkicTaFLeatSolpTPwV1YrtKfYYrkF2/WxXkTkj R3kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=REx4synB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si6806760plr.216.2019.05.13.09.41.12; Mon, 13 May 2019 09:41:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=REx4synB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731171AbfEMPPP (ORCPT + 99 others); Mon, 13 May 2019 11:15:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47714 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbfEMPPO (ORCPT ); Mon, 13 May 2019 11:15:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sYk1qF0Vg/KIRkZli5M/2CG/IiUILwRXwJH2skE3G4Y=; b=REx4synBpzyocaSPNSMhz/dBh x399vWJqF7p4npVM5QsVPsG55ErkZ5fQHzNE7SvhPaxAGuPAcMoqAhGfsgpUJo8i76muR4yWQQUtU tQxC2t4SmATs64p35q/UrMh+zG44Emo+gkoUbGpHChXki9LtyftxRMvXAnAt+8772zDazDPvmcrYZ IO6mWpHJHrpQ7Wh+tT7dtK938iXOpR30ImB4A7clcoQAjzmeyAiFIpojNXFvexY4vkFKlAG8lL58r +Sogz+Ndue92+0bFtoSM4dJkpK9Nw4F2bT0AXmKHBTkW2UkLKappwxdwuffjpqkmFrgkz4tA9Fal8 /7i9i1OVQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQCfO-0005lL-4u; Mon, 13 May 2019 15:15:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 57CEA2029F877; Mon, 13 May 2019 17:15:00 +0200 (CEST) Date: Mon, 13 May 2019 17:15:00 +0200 From: Peter Zijlstra To: Alexandre Chartre Cc: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, kvm@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, konrad.wilk@oracle.com, jan.setjeeilers@oracle.com, liran.alon@oracle.com, jwadams@google.com Subject: Re: [RFC KVM 24/27] kvm/isolation: KVM page fault handler Message-ID: <20190513151500.GY2589@hirez.programming.kicks-ass.net> References: <1557758315-12667-1-git-send-email-alexandre.chartre@oracle.com> <1557758315-12667-25-git-send-email-alexandre.chartre@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1557758315-12667-25-git-send-email-alexandre.chartre@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 13, 2019 at 04:38:32PM +0200, Alexandre Chartre wrote: > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c > index 46df4c6..317e105 100644 > --- a/arch/x86/mm/fault.c > +++ b/arch/x86/mm/fault.c > @@ -33,6 +33,10 @@ > #define CREATE_TRACE_POINTS > #include > > +bool (*kvm_page_fault_handler)(struct pt_regs *regs, unsigned long error_code, > + unsigned long address); > +EXPORT_SYMBOL(kvm_page_fault_handler); NAK NAK NAK NAK This is one of the biggest anti-patterns around.