From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751564AbdK3SxP (ORCPT ); Thu, 30 Nov 2017 13:53:15 -0500 Received: from mga09.intel.com ([134.134.136.24]:16161 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdK3SxO (ORCPT ); Thu, 30 Nov 2017 13:53:14 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,341,1508828400"; d="scan'208";a="179723628" Subject: Re: [PATCH 15/24] x86/mm: Allow flushing for future ASID switches To: Andy Lutomirski References: <20171127104923.14378-1-mingo@kernel.org> <20171127104923.14378-16-mingo@kernel.org> <20171130154414.aekkjd26p3hxyqwa@hirez.programming.kicks-ass.net> <3ca0bea7-932a-6d91-a9b4-d07045d444f5@linux.intel.com> <20171130161844.v7ynfdggo6g7j5l5@hirez.programming.kicks-ass.net> Cc: Peter Zijlstra , Ingo Molnar , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "H . Peter Anvin" , Borislav Petkov , Linus Torvalds From: Dave Hansen Message-ID: Date: Thu, 30 Nov 2017 10:53:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/30/2017 10:48 AM, Andy Lutomirski wrote: >> __flush_tlb() does a flushing CR3 write that flushes the current PCID. >> If we need other PCIDs flushed, we have to do it via the >> tlb_flush_shared_nonglobals() mechanism. >> >> Does it matter today in practice? Nope, we never have that situation. >> But, it also doesn't _hurt_ to have that line there in any way. > Should it be tlb_flush_shared_nonglobals_if_kernel_and_user_pagetables_are_separate()? The separate page tables doesn't play into it as far as I can tell. the important thing is that you have "stuff" in some other *kernel* address space that you didn't flush. > The whole idea that we can get away with ambiguous functions like > __flush_tlb() seems to be much less true with KAISER. I think we > should maybe start getting rid of overly vague functions like this. Yeah, making the intent more explicit would be highly welcome.