linux/arch/loongarch
Huacai Chen f93f67d06b LoongArch: Improve hardware page table walker
LoongArch has similar problems explained in commit 7f0b1bf045
("arm64: Fix barriers used for page table modifications"), when hardware
page table walker (PTW) enabled, speculative accesses may cause spurious
page fault in kernel space. Theoretically, in order to completely avoid
spurious page fault we need a "dbar + ibar" pair between the page table
modifications and the subsequent memory accesses using the corresponding
virtual address. But "ibar" is too heavy for performace, so we only use
a "dbar 0b11000" in set_pte(). And let spurious_fault() filter the rest
rare spurious page faults which should be avoided by "ibar".

Besides, we replace the llsc loop with amo in set_pte() which has better
performace, and refactor mmu_context.h to 1) avoid any load/store/branch
instructions between the writing of CSR.ASID & CSR.PGDL, 2) ensure flush
tlb operation is after updating ASID.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-09-24 15:32:20 +08:00
..
boot LoongArch: Fix GMAC's phy-mode definitions in dts 2024-06-03 15:45:53 +08:00
configs LoongArch changes for v6.10 2024-05-22 09:43:07 -07:00
crypto LoongArch/crypto: Clean up useless assignment operations 2024-03-19 15:50:34 +08:00
include LoongArch: Improve hardware page table walker 2024-09-24 15:32:20 +08:00
kernel LoongArch: Rework CPU feature probe from CPUCFG/IOCSR 2024-09-24 15:32:20 +08:00
kvm LoongArch: KVM: Invalidate guest steal time address on vCPU reset 2024-08-26 23:11:32 +08:00
lib LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 2024-05-14 12:24:18 +08:00
mm LoongArch: Improve hardware page table walker 2024-09-24 15:32:20 +08:00
net bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-03-14 19:28:52 -07:00
pci LoongArch: Add FDT booting support from efi system table 2022-12-14 08:41:53 +08:00
power LoongArch: Add ACPI standard hardware register based S3 support 2024-07-20 22:41:06 +08:00
vdso Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
Kbuild LoongArch: Allow device trees be built into the kernel 2024-01-17 12:43:00 +08:00
Kconfig LoongArch: Add ARCH_HAS_SET_DIRECT_MAP support 2024-09-24 15:32:20 +08:00
Kconfig.debug LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-21 10:18:40 +08:00
Makefile LoongArch: Use rustc option -Zdirect-access-external-data 2024-07-20 22:41:07 +08:00