mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 10:32:24 +00:00
Unlike no4lvl, no5lvl still continues to detect satp, which
requires va=pa mapping. When pa=0x800000000000, no5lvl
would fail in Sv48 mode due to an illegal VA value of
0x800000000000.
So, prevent detecting the satp flow for no5lvl, when
vaddr is invalid. Add the is_vaddr_valid() function for
checking.
Fixes: 26e7aacb83 ("riscv: Allow to downgrade paging mode from the command line")
Cc: Alexandre Ghiti <[email protected]>
Cc: Björn Töpel <[email protected]>
Signed-off-by: Guo Ren (Alibaba DAMO Academy) <[email protected]>
Tested-by: Fangyu Yu <[email protected]>
Link: https://patch.msgid.link/[email protected]
[[email protected]: cleaned up commit message]
Signed-off-by: Paul Walmsley <[email protected]>