riscv: Fix missing PAGE_PFN_MASK
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Mon, 11 Jul 2022 03:59:51 +0000 (09:29 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 11 Jul 2022 04:03:35 +0000 (09:33 +0530)
commit88573389aaa34640b9ecde15622c68e8737d8f8c
tree098415c3502e72e47adfe195cb3ff5861934a07e
parent32346491ddf24599decca06190ebca03ff9de7f8
riscv: Fix missing PAGE_PFN_MASK

There are a bunch of functions that use the PFN from a page table entry
that end up with the svpbmt upper-bits because they are missing the newly
introduced PAGE_PFN_MASK which leads to wrong addresses conversions and
then crash: fix this by adding this mask.

Fixes: 100631b48ded ("riscv: Fix accessing pfn bits in PTEs for non-32bit variants")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/pgtable-64.h
arch/riscv/include/asm/pgtable.h
arch/riscv/kvm/mmu.c