From patchwork Fri Oct 11 14:09:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 11185615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4BF6E1668 for ; Fri, 11 Oct 2019 14:10:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 230DA22466 for ; Fri, 11 Oct 2019 14:10:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 230DA22466 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 111016B0008; Fri, 11 Oct 2019 10:10:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0C3818E0007; Fri, 11 Oct 2019 10:10:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7E0F8E0006; Fri, 11 Oct 2019 10:10:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id BFAA86B0008 for ; Fri, 11 Oct 2019 10:10:07 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 6F0ED55FBB for ; Fri, 11 Oct 2019 14:10:07 +0000 (UTC) X-FDA: 76031688054.12.match70_103aab722521 X-Spam-Summary: 2,0,0,dd0c7cff148830a1,d41d8cd98f00b204,justin.he@arm.com,:catalin.marinas@arm.com:will@kernel.org:mark.rutland@arm.com:james.morse@arm.com:maz@kernel.org:willy@infradead.org:kirill.shutemov@linux.intel.com:linux-arm-kernel@lists.infradead.org:linux-kernel@vger.kernel.org::suzuki.poulose@arm.com:bp@alien8.de:hpa@zytor.com:x86@kernel.org:tglx@linutronix.de:akpm@linux-foundation.org:hejianet@gmail.com:kaly.xin@arm.com:nd@arm.com:justin.he@arm.com,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1345:1359:1431:1437:1534:1540:1711:1714:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2693:2901:3138:3139:3140:3141:3142:3351:3867:3871:3872:3874:4321:5007:6261:6737:7903:8634:10004:11026:11473:11657:11658:11914:12043:12048:12114:12297:12438:12555:12895:12986:13069:13311:13357:14096:14181:14384:14394:14721:21080:21451:21627:30054,0,RBL:217.140.110.172:@arm.com:.lbl8.mailshell.net-62.2.0.100 64.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCac he:0,MSF X-HE-Tag: match70_103aab722521 X-Filterd-Recvd-Size: 2563 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Oct 2019 14:10:06 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 235AF1570; Fri, 11 Oct 2019 07:10:06 -0700 (PDT) Received: from localhost.localdomain (entos-thunderx2-02.shanghai.arm.com [10.169.40.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 855AD3F68E; Fri, 11 Oct 2019 07:10:01 -0700 (PDT) From: Jia He To: Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Marc Zyngier , Matthew Wilcox , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Suzuki Poulose , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org Cc: Thomas Gleixner , Andrew Morton , hejianet@gmail.com, Kaly Xin , nd@arm.com, Jia He Subject: [PATCH v12 3/4] x86/mm: implement arch_faults_on_old_pte() stub on x86 Date: Fri, 11 Oct 2019 22:09:38 +0800 Message-Id: <20191011140939.6115-4-justin.he@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011140939.6115-1-justin.he@arm.com> References: <20191011140939.6115-1-justin.he@arm.com> 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: arch_faults_on_old_pte is a helper to indicate that it might cause page fault when accessing old pte. But on x86, there is feature to setting pte access flag by hardware. Hence implement an overriding stub which always returns false. Signed-off-by: Jia He Suggested-by: Will Deacon --- arch/x86/include/asm/pgtable.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0bc530c4eb13..ad97dc155195 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1463,6 +1463,12 @@ static inline bool arch_has_pfn_modify_check(void) return boot_cpu_has_bug(X86_BUG_L1TF); } +#define arch_faults_on_old_pte arch_faults_on_old_pte +static inline bool arch_faults_on_old_pte(void) +{ + return false; +} + #include #endif /* __ASSEMBLY__ */