summaryrefslogtreecommitdiffhomepage
path: root/pkg/ring0/lib_arm64.s
diff options
context:
space:
mode:
authorRobin Luk <lubin.lu@antgroup.com>2021-03-26 16:04:28 +0800
committerRobin Luk <lubin.lu@antgroup.com>2021-03-26 16:10:21 +0800
commit72cd22163f9c7fdfafa645b3b6826b185bbbdf76 (patch)
treecec53fc59bfbab898a9686988cb0a7568e27bf48 /pkg/ring0/lib_arm64.s
parentfbec65fc3f21773cbec3db4aadf27b85e8859448 (diff)
arm64 ring0: don't use inner-sharable to invalidate tlb
It is enough to invalidate the tlb of local vcpu in switch(). TLBI with inner-sharable will invalidate the tlb in other vcpu. Arm64 hardware supports at least 256 pcid, so I think it's ok to set the length of pcid pool to 128. Signed-off-by: Robin Luk <lubin.lu@antgroup.com>
Diffstat (limited to 'pkg/ring0/lib_arm64.s')
-rw-r--r--pkg/ring0/lib_arm64.s8
1 files changed, 8 insertions, 0 deletions
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)