arm64: Kconfig: Re-jig CONFIG options for 52-bit VA
Enabling 52-bit VAs for userspace is pretty confusing, since it requires you to select "48-bit" virtual addressing in the Kconfig. Rework the logic so that 52-bit user virtual addressing is advertised in the "Virtual address space size" choice, along with some help text to describe its interaction with Pointer Authentication. The EXPERT-only option to force all user mappings to the 52-bit range is then made available immediately below the VA size selection. Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
@@ -318,7 +318,7 @@ __create_page_tables:
|
||||
adrp x0, idmap_pg_dir
|
||||
adrp x3, __idmap_text_start // __pa(__idmap_text_start)
|
||||
|
||||
#ifdef CONFIG_ARM64_52BIT_VA
|
||||
#ifdef CONFIG_ARM64_USER_VA_BITS_52
|
||||
mrs_s x6, SYS_ID_AA64MMFR2_EL1
|
||||
and x6, x6, #(0xf << ID_AA64MMFR2_LVA_SHIFT)
|
||||
mov x5, #52
|
||||
@@ -800,7 +800,7 @@ ENTRY(__enable_mmu)
|
||||
ENDPROC(__enable_mmu)
|
||||
|
||||
ENTRY(__cpu_secondary_check52bitva)
|
||||
#ifdef CONFIG_ARM64_52BIT_VA
|
||||
#ifdef CONFIG_ARM64_USER_VA_BITS_52
|
||||
ldr_l x0, vabits_user
|
||||
cmp x0, #52
|
||||
b.ne 2f
|
||||
|
@@ -139,7 +139,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
if (!cpu_online(cpu)) {
|
||||
pr_crit("CPU%u: failed to come online\n", cpu);
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARM64_52BIT_VA) && va52mismatch)
|
||||
if (IS_ENABLED(CONFIG_ARM64_USER_VA_BITS_52) && va52mismatch)
|
||||
pr_crit("CPU%u: does not support 52-bit VAs\n", cpu);
|
||||
|
||||
ret = -EIO;
|
||||
|
Reference in New Issue
Block a user