mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Merge pull request #5736 from lubinszARM:pr_bblu_tlb_asid
PiperOrigin-RevId: 367523491
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -47,7 +47,7 @@ const (
|
||||
// Beyond a relatively small number, there are likely few perform
|
||||
// benefits, since the TLB has likely long since lost any translations
|
||||
// from more than a few PCIDs past.
|
||||
poolPCIDs = 8
|
||||
poolPCIDs = 128
|
||||
)
|
||||
|
||||
func (m *machine) mapUpperHalf(pageTable *pagetables.PageTables) {
|
||||
|
||||
Reference in New Issue
Block a user