lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241205103729.14798-19-luxu.kernel@bytedance.com>
Date: Thu,  5 Dec 2024 18:37:26 +0800
From: Xu Lu <luxu.kernel@...edance.com>
To: paul.walmsley@...ive.com,
	palmer@...belt.com,
	aou@...s.berkeley.edu,
	ardb@...nel.org,
	anup@...infault.org,
	atishp@...shpatra.org
Cc: xieyongji@...edance.com,
	lihangjing@...edance.com,
	punit.agrawal@...edance.com,
	linux-kernel@...r.kernel.org,
	linux-riscv@...ts.infradead.org,
	Xu Lu <luxu.kernel@...edance.com>
Subject: [RFC PATCH v2 18/21] riscv: Kconfig: Introduce 64K page size

This patch introduces new config to control whether enabling the 64K
base page feature on RISC-V.

The 64K config will set software page size as 64K and automatically use
svnapot to accelerate basic page mapping.

Signed-off-by: Xu Lu <luxu.kernel@...edance.com>
---
 arch/riscv/Kconfig | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 2c0cb175a92a..592eb5766029 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -167,7 +167,6 @@ config RISCV
 	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
 	select HAVE_MOVE_PMD
 	select HAVE_MOVE_PUD
-	select HAVE_PAGE_SIZE_4KB
 	select HAVE_PCI
 	select HAVE_PERF_EVENTS
 	select HAVE_PERF_REGS
@@ -885,6 +884,28 @@ config RISCV_BOOT_SPINWAIT
 
 	  If unsure what to do here, say N.
 
+choice
+	prompt "Page size"
+	default RISCV_4K_PAGES
+	help
+	  Page size (translation granule) configuration.
+
+config RISCV_4K_PAGES
+	bool "4KB"
+	select HAVE_PAGE_SIZE_4KB
+	help
+	  This feature enables 4KB pages support.
+
+config RISCV_64K_PAGES
+	bool "64KB"
+	depends on RISCV_ISA_SVNAPOT && 64BIT
+	select HAVE_PAGE_SIZE_64KB
+	select RISCV_USE_SW_PAGE
+	help
+	  This feature enables 64KB pages support.
+
+endchoice
+
 config ARCH_SUPPORTS_KEXEC
 	def_bool y
 
-- 
2.20.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ