From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: linux-kernel@vger.kernel.org
Cc: osalvador@suse.de, 42.hyeyoo@gmail.com, byungchul@sk.com,
dave.hansen@linux.intel.com, luto@kernel.org,
peterz@infradead.org, akpm@linux-foundation.org,
max.byungchul.park@sk.com, max.byungchul.park@gmail.com
Subject: [RFC 1/1] x86/vmemmap: Add missing update of PML4 table / PML5 table entry
Date: Fri, 14 Feb 2025 21:51:51 +0200 [thread overview]
Message-ID: <20250214195151.168306-2-gwan-gyeong.mun@intel.com> (raw)
In-Reply-To: <20250214195151.168306-1-gwan-gyeong.mun@intel.com>
when performing vmemmap populate, if the entry of the PML4 table/PML5 table
pointing to the target virtual address has never been updated, a page fault
occurs when the memset(start) called from the vmemmap_use_new_sub_pmd()
execution flow.
This fixes the problem of using the virtual address without updating the
entry in the PML4 table or PML5 table. But this is a temporary solution to
prevent page fault problems, and it requires improvement of the routine
that updates the missing entry in the PML4 table or PML5 table.
Fixes: faf1c0008a33 ("x86/vmemmap: optimize for consecutive sections in partial populated PMDs")
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/x86/mm/init_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 01ea7c6df303..7a4d8cea1a2e 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -912,6 +912,7 @@ static void __meminit vmemmap_use_new_sub_pmd(unsigned long start, unsigned long
{
const unsigned long page = ALIGN_DOWN(start, PMD_SIZE);
+ sync_global_pgds(start, end - 1);
vmemmap_flush_unused_pmd();
/*
--
2.48.1
next prev parent reply other threads:[~2025-02-14 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 19:51 [RFC 0/1] " Gwan-gyeong Mun
2025-02-14 19:51 ` Gwan-gyeong Mun [this message]
2025-02-14 19:57 ` [RFC 1/1] " Dave Hansen
2025-02-15 0:20 ` Harry (Hyeonggon) Yoo
2025-02-15 0:29 ` Dave Hansen
2025-02-17 11:40 ` Gwan-gyeong Mun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250214195151.168306-2-gwan-gyeong.mun@intel.com \
--to=gwan-gyeong.mun@intel.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=byungchul@sk.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=max.byungchul.park@gmail.com \
--cc=max.byungchul.park@sk.com \
--cc=osalvador@suse.de \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®