Skip to content

Commit 659ad6d

Browse files
committed
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>
1 parent c9d5737 commit 659ad6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/riscv/kvm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ int kvm_riscv_gstage_ioremap(struct kvm *kvm, gpa_t gpa,
361361
pfn = __phys_to_pfn(hpa);
362362

363363
for (addr = gpa; addr < end; addr += PAGE_SIZE) {
364-
pte = pfn_pte(pfn, PAGE_KERNEL);
364+
pte = pfn_pte(pfn, PAGE_KERNEL_IO);
365365

366366
if (!writable)
367367
pte = pte_wrprotect(pte);

0 commit comments

Comments
 (0)