mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-29 18:00:18 +00:00
hv_vm: Short-circuit hv_translate when MMU is off
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
8d5596a1a1
commit
bcdafe8d00
1 changed files with 3 additions and 0 deletions
|
@ -329,6 +329,9 @@ int hv_map_hook(u64 from, hv_hook_t *hook, u64 size)
|
|||
|
||||
u64 hv_translate(u64 addr, bool s1, bool w)
|
||||
{
|
||||
if (!(mrs(SCTLR_EL12) & SCTLR_M))
|
||||
return addr; // MMU off
|
||||
|
||||
u64 el = FIELD_GET(SPSR_M, mrs(SPSR_EL2)) >> 2;
|
||||
u64 save = mrs(PAR_EL1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue