From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbdLDXH4 (ORCPT ); Mon, 4 Dec 2017 18:07:56 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55650 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbdLDXHx (ORCPT ); Mon, 4 Dec 2017 18:07:53 -0500 Date: Tue, 5 Dec 2017 00:06:59 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Thomas Gleixner , LKML , X86 ML , Linus Torvalds , Dave Hansen , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , Daniel Gruss , Dave Hansen , Ingo Molnar , michael.schwarz@iaik.tugraz.at, Borislav Petkov , moritz.lipp@iaik.tugraz.at, richard.fellner@student.tugraz.at, Andrew Banman , mike.travis@hpe.com Subject: Re: [patch 51/60] x86/mm: Allow flushing for future ASID switches Message-ID: <20171204230659.GG20227@worktop.programming.kicks-ass.net> References: <20171204140706.296109558@linutronix.de> <20171204150609.002009374@linutronix.de> <20171204224757.GC20227@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Dec 04, 2017 at 02:54:46PM -0800, Andy Lutomirski wrote: > On Mon, Dec 4, 2017 at 2:47 PM, Peter Zijlstra wrote: > > As is __flush_tlb_single() does user and __flush_tlb_one() does > > user+kernel. > > Yep. A one-liner above the function to that effect would make it > *way* clearer what's going on. Bah, since my notes are upstairs I actually got that wrong, do_kernel_range_flush() also uses __flush_tlb_single(), but then it finishes with invalidate_pcid_other(), so effectively it shoots down world. So we should probably switch do_kernel_range_flush() to __flush_tlb_one() and tlb_uv.c (pending SGI approval) to __flush_tlb_single(). I'll dig through my notes in the morning and do a patch with comments.