LoongArch: mm: Fix huge page entry update for virtual machine
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 8 Dec 2022 06:59:15 +0000 (14:59 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 8 Dec 2022 06:59:15 +0000 (14:59 +0800)
commitb681604edab66f20dde767f4690e554f26c5bfb9
treeb171f5f20c9f1408dea9b56cb244f2e41f1c13e6
parent143d64bdbdb85787953a70332f9e5f658b678550
LoongArch: mm: Fix huge page entry update for virtual machine

In virtual machine (guest mode), the tlbwr instruction can not write the
last entry of MTLB, so we need to make it non-present by invtlb and then
write it by tlbfill. This also simplify the whole logic.

Signed-off-by: Rui Wang <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/mm/tlbex.S