Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852AbdLEV2L (ORCPT ); Tue, 5 Dec 2017 16:28:11 -0500 Received: from merlin.infradead.org ([205.233.59.134]:41312 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbdLEV2K (ORCPT ); Tue, 5 Dec 2017 16:28:10 -0500 Date: Tue, 5 Dec 2017 22:27:27 +0100 From: Peter Zijlstra To: Andrew Banman Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Linus Torvalds , Andy Lutomirsky , Dave Hansen , Borislav Petkov , Greg KH , keescook@google.com, hughd@google.com, Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , daniel.gruss@iaik.tugraz.at, Dave Hansen , Ingo Molnar , moritz.lipp@iaik.tugraz.at, linux-mm@kvack.org, Borislav Petkov , michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, Mike Travis Subject: Re: [PATCH 5/9] x86/uv: Use the right tlbflush API Message-ID: <20171205212727.GU3165@worktop.lehotels.local> References: <20171205123444.990868007@infradead.org> <20171205123820.134563117@infradead.org> <5aed7d7f-b093-b65c-403e-46bdbcf9bc5a@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5aed7d7f-b093-b65c-403e-46bdbcf9bc5a@hpe.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 35 On Tue, Dec 05, 2017 at 03:09:48PM -0600, Andrew Banman wrote: > On 12/5/17 6:34 AM, Peter Zijlstra wrote: > >Since uv_flush_tlb_others() implements flush_tlb_others() which is > >about flushing user mappings, we should use __flush_tlb_single(), > >which too is about flushing user mappings. > > > >Cc: Andrew Banman > >Cc: Mike Travis > >Signed-off-by: Peter Zijlstra (Intel) > >--- > > arch/x86/platform/uv/tlb_uv.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >--- a/arch/x86/platform/uv/tlb_uv.c > >+++ b/arch/x86/platform/uv/tlb_uv.c > >@@ -299,7 +299,7 @@ static void bau_process_message(struct m > > local_flush_tlb(); > > stat->d_alltlb++; > > } else { > >- __flush_tlb_one(msg->address); > >+ __flush_tlb_single(msg->address); > > stat->d_onetlb++; > > } > > stat->d_requestee++; > > This looks like the right thing to do. We'll be testing it and complain later if > we find any problems, but I'm not expecting any since this patch looks to > maintain our status quo. Well, with KPTI (the-patch-set-formerly-known-as-kaiser), there will be a distinct difference between the two. With KPTI __flush_tlb_one() would end up invalidating all kernel mappings while __flush_tlb_single() will end up only invalidating the user mappings of the current mm.