From patchwork Mon Jul 10 20:43:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 118106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp75487vqm; Mon, 10 Jul 2023 14:13:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlEVgkQWCHi9lrVibu4T5EhTlqOsf14sDK4J8BouBETvF+uZaGsmnB4KcuMMNgvWCBiO7m6u X-Received: by 2002:a92:dc44:0:b0:345:a201:82b7 with SMTP id x4-20020a92dc44000000b00345a20182b7mr11949887ilq.26.1689023605280; Mon, 10 Jul 2023 14:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689023605; cv=none; d=google.com; s=arc-20160816; b=v+nstOKBTAknGgEzs3kFSjvs2EM+yrlH/grHTRdslXBWe3KrVVFjI6M2VWOTHJzRkn TQzvY11JQJcSEMWw8lg4MVwcmcTa/ZgwLhilfeJ5rfNsQnpT9WN3DUtAOUdwN5IfvLQv 6kOeGddfJmbti1VqSjPdSPTxRMW1StpK/z8/22pFoP7oL3ep2xAPlhcH3mHR1wGr7tK7 tgqNN0WBS0jxWQ6wZjq9z/bqdOKk5m0LsVszc17vAAb1sx8C3qlLgkHOhpkMh6rYy5SB /MFBk1utsetth15EJ6YAXleWwb5ZI+suCsLViRuSRd/wO1y3HIonDzi4TjIqibqKR2jy A81Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sMQRt4vH1ObkP1bKXMUZ8zoM72SIlxiZjD55fkj3j0k=; fh=qVg5AHFr4dYKBFX4ShpZB9Ii08Z0Id08YllyJGucfqA=; b=TBqcdaoaQmkxAoU/nib4mRccOVwmkbCj4XUvW0dcVlKfuOfz6Gg4bibMxsB6Ozmw+6 SPmXIX7Sbj2+gtEWKe7BfAfRh5tvkoV1isjg91lMsGueB6UGT+XlXwJ9k/T+VtpjGThp mCYOjDXAzTkda70akkN0Kk89kr057dlM91RunBxgbt4CEmVn7cRWvD50Yxj/tomfDopY e8EtKTVWY+4KybwkRMABy/Vgs5ancMbap2ZRvEgSljVf0JMWd4pWNxILlvurCKShGCaE Ey+UJMrwMChxCzIquIzzgeSRTfX7y9hzN34kXXBIBlB4iku8HhAEmK6+68ofMiBuPBVv 3aBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n3OahCLr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a170902f38a00b001b55934ae61si352416ple.288.2023.07.10.14.13.12; Mon, 10 Jul 2023 14:13:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n3OahCLr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232661AbjGJUpk (ORCPT + 99 others); Mon, 10 Jul 2023 16:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjGJUoQ (ORCPT ); Mon, 10 Jul 2023 16:44:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B5DE4D; Mon, 10 Jul 2023 13:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=sMQRt4vH1ObkP1bKXMUZ8zoM72SIlxiZjD55fkj3j0k=; b=n3OahCLrH5ynSGq4TtitzKFZCm tCz7WUYXNr5RD1i/rXpMMwliW4bONdC7+C/iFgM/tLwwAtd+drGtecPi8nyKP+4KpGdkBguM8BzBL qm4OC/hSWVz0SYJS3P3id1s7KFaaC/BcXTAHQVR6MJP3POJnWrGtle2JD+xi7BusE+ns41ORyEKVr F1fyClyXhHiAK6uepDxgQX68J0kwUgdcAvl4PT8gRA/6kG2RUQrpaj+XO96r5BPI3XrTI9t9sTWWz Z3wad0zjHfsvX1okoo2p+8FuF/jgzM9RVpF49eI4rQ7zbzJbLiurc6Sr6UEju5X1kggGqjnRewSWo 7Hw+7bSg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qIxjU-00Euqd-Cy; Mon, 10 Jul 2023 20:43:44 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v5 28/38] x86: Implement the new page table range API Date: Mon, 10 Jul 2023 21:43:29 +0100 Message-Id: <20230710204339.3554919-29-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230710204339.3554919-1-willy@infradead.org> References: <20230710204339.3554919-1-willy@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771069616412706390 X-GMAIL-MSGID: 1771069616412706390 Add PFN_PTE_SHIFT and a noop update_mmu_cache_range(). Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport (IBM) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" --- arch/x86/include/asm/pgtable.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index c6242bc58a71..9818f13bfa09 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -185,6 +185,8 @@ static inline int pte_special(pte_t pte) static inline u64 protnone_mask(u64 val); +#define PFN_PTE_SHIFT PAGE_SHIFT + static inline unsigned long pte_pfn(pte_t pte) { phys_addr_t pfn = pte_val(pte); @@ -1020,13 +1022,6 @@ static inline pud_t native_local_pudp_get_and_clear(pud_t *pudp) return res; } -static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte) -{ - page_table_check_ptes_set(mm, addr, ptep, pte, 1); - set_pte(ptep, pte); -} - static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { @@ -1292,6 +1287,11 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { } +static inline void update_mmu_cache_range(struct vm_fault *vmf, + struct vm_area_struct *vma, unsigned long addr, + pte_t *ptep, unsigned int nr) +{ +} static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd) {