The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Brendan Jackman <jackmanb@google.com>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	Brendan Jackman <jackmanb@google.com>,
	 Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	Wei Xu <weixugc@google.com>,
	 Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	Lorenzo Stoakes <ljs@kernel.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>,  <rppt@kernel.org>,
	Sumit Garg <sumit.garg@oss.qualcomm.com>, <derkling@google.com>,
	 <reijiw@google.com>, Will Deacon <will@kernel.org>,
	<rientjes@google.com>,  <patrick.roy@linux.dev>,
	"Itazuri, Takahiro" <itazur@amazon.co.uk>,
	 Andy Lutomirski <luto@kernel.org>,
	David Kaplan <david.kaplan@amd.com>,
	 Thomas Gleixner <tglx@kernel.org>,
	Yosry Ahmed <yosry@kernel.org>
Subject: Re: [PATCH v2 20/22] mm/page_alloc: implement __GFP_UNMAPPED|__GFP_ZERO allocations
Date: Fri, 15 May 2026 16:50:51 +0000	[thread overview]
Message-ID: <DIJELVS3UK3G.AVIQMWBN2WVS@google.com> (raw)
In-Reply-To: <3453825f-2bc0-4d63-8731-3eaf9fc716a4@kernel.org>

On Wed May 13, 2026 at 5:00 PM UTC, Vlastimil Babka (SUSE) wrote:
>>  #define PAGE_KERNEL		__pgprot_mask(__PAGE_KERNEL            | _ENC)
>> +#define PAGE_KERNEL_NOGLOBAL	__pgprot_mask(__PAGE_KERNEL_NOGLOBAL   | _ENC)
>>  #define PAGE_KERNEL_NOENC	__pgprot_mask(__PAGE_KERNEL            |    0)
>>  #define PAGE_KERNEL_RO		__pgprot_mask(__PAGE_KERNEL_RO         | _ENC)
>>  #define PAGE_KERNEL_EXEC	__pgprot_mask(__PAGE_KERNEL_EXEC       | _ENC)
>
> Should this be part of earlier mermap x86 patches?

Maybe it could be in the patch that implements
arch_mermap_pgprot_allowed()? This is the first patch that actually uses
PAGE_KERNEL_NOGLOBAL though since mermap code just cares that you didn't
set _PAGE_GLOBAL.

>> diff --git a/mm/Kconfig b/mm/Kconfig
>> index e4cb52149acad..05b2bb841d0e0 100644
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -1506,7 +1506,14 @@ config MERMAP_KUNIT_TEST
>>  	  If unsure, say N.
>>  
>>  config PAGE_ALLOC_UNMAPPED
>> -	bool "Support allocating pages that aren't in the direct map" if COMPILE_TEST
>> -	default COMPILE_TEST
>> +	bool "Support allocating pages that aren't in the direct map"
>> +	depends on MERMAP
>> +
>> +config PAGE_ALLOC_KUNIT_TESTS
>> +	tristate "KUnit tests for the page allocator" if !KUNIT_ALL_TESTS
>> +	depends on KUNIT
>> +	default KUNIT_ALL_TESTS
>> +	help
>> +	  Builds KUnit tests for the page allocator.
>
> This belongs to the next patch?

Oops, thanks.