Page MenuHomeFreeBSD

Add an instruction barrier to pmap_activate()
ClosedPublic

Authored by alc on Jul 10 2019, 3:15 PM.
Tags
None
Referenced Files
F107988853: D20904.diff
Mon, Jan 20, 6:23 AM
F107938977: D20904.diff
Sun, Jan 19, 6:04 PM
Unknown Object (File)
Oct 25 2024, 11:25 AM
Unknown Object (File)
Sep 28 2024, 7:26 AM
Unknown Object (File)
Sep 20 2024, 9:51 PM
Unknown Object (File)
Sep 20 2024, 9:51 PM
Unknown Object (File)
Sep 20 2024, 9:51 PM
Unknown Object (File)
Sep 20 2024, 9:51 PM

Details

Summary

According to Section D5.10.3 "Maintenance requirements on changing System register values" of the architecture manual, an isb instruction should be executed after updating ttbr0_el1 and before invalidating the TLB.

Test Plan

After adding the isb instruction into pmap_activate(), I can replace the pmap_invalidate_page() in pmap_enter_quick_locked() with a dsb ishst instruction and not suffer from spurious bus errors.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

efi_arch_enter() and _leave() have the isb following the TLB invalidation.

Perhaps we should add a cpufunc.h intrinsic for these two instructions?

This revision is now accepted and ready to land.Jul 10 2019, 3:20 PM

Add the isb instruction to efi_arch_enter() and efi_arch_leave().

This revision now requires review to proceed.Jul 10 2019, 3:43 PM
This revision is now accepted and ready to land.Jul 10 2019, 3:46 PM

efi_arch_enter() and _leave() have the isb following the TLB invalidation.

I believe that the isb instruction must be executed before and after TLB invalidation.

Perhaps we should add a cpufunc.h intrinsic for these two instructions?

Probably.