diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-04-08 22:57:51 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-08 22:57:51 +0000 |
commit | 0525a6fbfbba7f2792c31937caaaab4e154741a5 (patch) | |
tree | f10e225b184be6919aea650277781a2276ed9570 /pkg/ring0 | |
parent | 15d6128c115efcd99756cf4876d2afafb06c5506 (diff) | |
parent | ae019e39b0f3c6cdff0b1e86771698693fb074e6 (diff) |
Merge release-20210322.0-63-gae019e39b (automated)
Diffstat (limited to 'pkg/ring0')
-rw-r--r-- | pkg/ring0/kernel_arm64.go | 2 | ||||
-rw-r--r-- | pkg/ring0/lib_arm64.go | 3 | ||||
-rw-r--r-- | pkg/ring0/lib_arm64.s | 8 |
3 files changed, 12 insertions, 1 deletions
diff --git a/pkg/ring0/kernel_arm64.go b/pkg/ring0/kernel_arm64.go index 7975e5f92..0496c40b4 100644 --- a/pkg/ring0/kernel_arm64.go +++ b/pkg/ring0/kernel_arm64.go @@ -65,7 +65,7 @@ func (c *CPU) SwitchToUser(switchOpts SwitchOpts) (vector Vector) { storeEl0Fpstate(switchOpts.FloatingPointState.BytePointer()) if switchOpts.Flush { - FlushTlbByASID(uintptr(switchOpts.UserASID)) + LocalFlushTlbByASID(uintptr(switchOpts.UserASID)) } regs := switchOpts.Registers diff --git a/pkg/ring0/lib_arm64.go b/pkg/ring0/lib_arm64.go index e44df00a6..5eabd4296 100644 --- a/pkg/ring0/lib_arm64.go +++ b/pkg/ring0/lib_arm64.go @@ -31,6 +31,9 @@ func FlushTlbByVA(addr uintptr) // FlushTlbByASID invalidates tlb by ASID/Inner-Shareable. func FlushTlbByASID(asid uintptr) +// LocalFlushTlbByASID invalidates tlb by ASID. +func LocalFlushTlbByASID(asid uintptr) + // FlushTlbAll invalidates all tlb. func FlushTlbAll() diff --git a/pkg/ring0/lib_arm64.s b/pkg/ring0/lib_arm64.s index e39b32841..69ebaf519 100644 --- a/pkg/ring0/lib_arm64.s +++ b/pkg/ring0/lib_arm64.s @@ -32,6 +32,14 @@ TEXT ·FlushTlbByASID(SB),NOSPLIT,$0-8 DSB $11 // dsb(ish) RET +TEXT ·LocalFlushTlbByASID(SB),NOSPLIT,$0-8 + MOVD asid+0(FP), R1 + LSL $TLBI_ASID_SHIFT, R1, R1 + DSB $10 // dsb(ishst) + WORD $0xd5088741 // tlbi aside1, x1 + DSB $11 // dsb(ish) + RET + TEXT ·LocalFlushTlbAll(SB),NOSPLIT,$0 DSB $6 // dsb(nshst) WORD $0xd508871f // __tlbi(vmalle1) |