summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kvm
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2022-07-29 17:15:12 +0530
committerAnup Patel <anup@brainfault.org>2022-07-29 17:15:12 +0530
commit659ad6d82c3121088daeaa38ba94d182b55bbb22 (patch)
tree7496f658bf6ac2b9e30dda2b8e510f0d23109637 /arch/riscv/kvm
parentc9d57373fc87a3ad00d12cffd0bb4c8108c73ff9 (diff)
downloadlinux-659ad6d82c3121088daeaa38ba94d182b55bbb22.tar.gz
linux-659ad6d82c3121088daeaa38ba94d182b55bbb22.tar.bz2
linux-659ad6d82c3121088daeaa38ba94d182b55bbb22.zip
RISC-V: KVM: Use PAGE_KERNEL_IO in kvm_riscv_gstage_ioremap()
When the host has Svpbmt extension, we should use page based memory type 2 (i.e. IO) for IO mappings in the G-stage page table. To achieve this, we replace use of PAGE_KERNEL with PAGE_KERNEL_IO in the kvm_riscv_gstage_ioremap(). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/kvm')
-rw-r--r--arch/riscv/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c
index f7862ca4c4c6..bc545aef6034 100644
--- a/arch/riscv/kvm/mmu.c
+++ b/arch/riscv/kvm/mmu.c
@@ -361,7 +361,7 @@ int kvm_riscv_gstage_ioremap(struct kvm *kvm, gpa_t gpa,
pfn = __phys_to_pfn(hpa);
for (addr = gpa; addr < end; addr += PAGE_SIZE) {
- pte = pfn_pte(pfn, PAGE_KERNEL);
+ pte = pfn_pte(pfn, PAGE_KERNEL_IO);
if (!writable)
pte = pte_wrprotect(pte);