Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48C1DC6FD1E for ; Mon, 6 Mar 2023 23:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbjCFXMD (ORCPT ); Mon, 6 Mar 2023 18:12:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjCFXMB (ORCPT ); Mon, 6 Mar 2023 18:12:01 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276CD3B842; Mon, 6 Mar 2023 15:11:59 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4PVvV227K5z4wgq; Tue, 7 Mar 2023 10:11:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1678144317; bh=Y3ZQe1v9yNGZGVZM7F5FvSpbccPl60HdWh6Jlu25Uj4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=G+Sab/KI7GAdy0Diebk6cQ/coHwcVMTqNmdTfQxYLnOVvsIndv9rl72OPozMBlYMe Va4LySAlFrcJ4TuVE14hxLaQ9JYQIiR9AN3z5EmgKmEhqBM84PEO4ZbGo1ccID9Ebm olatYOdWLf41Dqaq+qy1i05gpFdoTdeJAOtcfeC306+ClAa8E4O8DK+nUSlu+njFEP 3auPTqQhaABfq8gsiySo+KUowhvu4Lg+vCfJuZixOxHqq5aDNDftd1HYeHD4cJAMK3 cCAJXBNKuC0w0B7clhHf+fYnXLGSBv3I9wXVnnec+nGJu+XSzbMXBLpNjTD7lQWVdh VlwMZSuOylJmw== From: Michael Ellerman To: Gerald Schaefer , Andrew Morton Cc: David Hildenbrand , Matthew Wilcox , Catalin Marinas , Anshuman Khandual , Will Deacon , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Alexander Gordeev , linux-mips , linux-power , linux-x86 , linux-s390 , LKML , linux-mm Subject: Re: [PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault() In-Reply-To: <20230306161548.661740-1-gerald.schaefer@linux.ibm.com> References: <20230306161548.661740-1-gerald.schaefer@linux.ibm.com> Date: Tue, 07 Mar 2023 10:11:53 +1100 Message-ID: <87mt4p1nly.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gerald Schaefer writes: > s390 can do more fine-grained handling of spurious TLB protection faults, > when there also is the PTE pointer available. > > Therefore, pass on the PTE pointer to flush_tlb_fix_spurious_fault() as > an additional parameter. > > This will add no functional change to other architectures, but those with > private flush_tlb_fix_spurious_fault() implementations need to be made > aware of the new parameter. > > Reviewed-by: Alexander Gordeev > Signed-off-by: Gerald Schaefer > --- > arch/arm64/include/asm/pgtable.h | 2 +- > arch/mips/include/asm/pgtable.h | 3 ++- > arch/powerpc/include/asm/book3s/64/tlbflush.h | 3 ++- > arch/s390/include/asm/pgtable.h | 12 +++++++----- > arch/x86/include/asm/pgtable.h | 2 +- > include/linux/pgtable.h | 2 +- > mm/memory.c | 3 ++- > mm/pgtable-generic.c | 2 +- > 8 files changed, 17 insertions(+), 12 deletions(-) ... > diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h > index 2bbc0fcce04a..ff7f0ee179e5 100644 > --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h > +++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h > @@ -121,7 +121,8 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, > > #define flush_tlb_fix_spurious_fault flush_tlb_fix_spurious_fault > static inline void flush_tlb_fix_spurious_fault(struct vm_area_struct *vma, > - unsigned long address) > + unsigned long address, > + pte_t *ptep) > { > /* > * Book3S 64 does not require spurious fault flushes because the PTE Acked-by: Michael Ellerman (powerpc) cheers