From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24EC5C433E8 for ; Tue, 28 Jul 2020 10:54:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C98DF20656 for ; Tue, 28 Jul 2020 10:54:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Wtfoox39" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C98DF20656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 721108D0009; Tue, 28 Jul 2020 06:54:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CE8F8D0005; Tue, 28 Jul 2020 06:54:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 596C08D0009; Tue, 28 Jul 2020 06:54:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 40F398D0005 for ; Tue, 28 Jul 2020 06:54:19 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E96B11EE6 for ; Tue, 28 Jul 2020 10:54:18 +0000 (UTC) X-FDA: 77087175396.20.fall78_11093b826f69 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id C460C180C07AB for ; Tue, 28 Jul 2020 10:54:18 +0000 (UTC) X-HE-Tag: fall78_11093b826f69 X-Filterd-Recvd-Size: 4104 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 10:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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; bh=W8EGYrbvZ2JVHYH7/4O92e1pVKCkXBCpOwNppiviJYk=; b=Wtfoox39Dk/76/LPPiZmQbB7Q8 ma4Cgj5I6CFvppLLACjfC+ulmhw/ikvx8xKuq4K4ZT/lcPpweCF9s1X/W6nHXPBaW2WzQ1U7i/+x8 MeSEecGjjKG7KPW0+GURGhA00crHAaWslebe2FvBrszZJx4y6U9xYk18WCHfspXFwhG/K9iFHT3N7 Nez/SMmoBFj36/bAJU87dpZNAOu+QZCZb/vhQFCM13w/RHlej0vCqmtWbLb6CLPvKaZnPT991gkAD zpYh9IaUYHFcPBXQVRfh5qsmqfbSQWA5vBzvfjHcsHlcwRWAVGNZaAqLl6u5+s03PaK01+nhRDZAQ 8tu2wF+w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0NFL-0003No-RN; Tue, 28 Jul 2020 10:54:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3B0CC300238; Tue, 28 Jul 2020 12:54:10 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 20B842BE3E477; Tue, 28 Jul 2020 12:54:10 +0200 (CEST) Date: Tue, 28 Jul 2020 12:54:10 +0200 From: peterz@infradead.org To: Nicholas Piggin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH 23/24] x86: use asm-generic/mmu_context.h for no-op implementations Message-ID: <20200728105410.GU119549@hirez.programming.kicks-ass.net> References: <20200728033405.78469-1-npiggin@gmail.com> <20200728033405.78469-24-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728033405.78469-24-npiggin@gmail.com> X-Rspamd-Queue-Id: C460C180C07AB X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 28, 2020 at 01:34:04PM +1000, Nicholas Piggin wrote: > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x86@kernel.org > Cc: "H. Peter Anvin" > Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) > --- > arch/x86/include/asm/mmu_context.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h > index 47562147e70b..255750548433 100644 > --- a/arch/x86/include/asm/mmu_context.h > +++ b/arch/x86/include/asm/mmu_context.h > @@ -92,12 +92,14 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next) > } > #endif > > +#define enter_lazy_tlb enter_lazy_tlb > extern void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk); > > /* > * Init a new mm. Used on mm copies, like at fork() > * and on mm's that are brand-new, like at execve(). > */ > +#define init_new_context init_new_context > static inline int init_new_context(struct task_struct *tsk, > struct mm_struct *mm) > { > @@ -117,6 +119,8 @@ static inline int init_new_context(struct task_struct *tsk, > init_new_context_ldt(mm); > return 0; > } > + > +#define destroy_context destroy_context > static inline void destroy_context(struct mm_struct *mm) > { > destroy_context_ldt(mm); > @@ -215,4 +219,6 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, > > unsigned long __get_current_cr3_fast(void); > > +#include > + > #endif /* _ASM_X86_MMU_CONTEXT_H */ > -- > 2.23.0 >