RISC-V: KVM: Add G-stage ioremap() and iounmap() functions
authorAnup Patel <apatel@ventanamicro.com>
Fri, 29 Jul 2022 11:45:06 +0000 (17:15 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 29 Jul 2022 11:45:06 +0000 (17:15 +0530)
commitc9d57373fc87a3ad00d12cffd0bb4c8108c73ff9
treea763fc90f54e878d257fef629984ed59b6612b61
parent4ab0e470c06dc741f6583578da44961669331b78
RISC-V: KVM: Add G-stage ioremap() and iounmap() functions

The in-kernel AIA IMSIC support requires on-demand mapping / unmapping
of Guest IMSIC address to Host IMSIC guest files. To help achieve this,
we add kvm_riscv_stage2_ioremap() and kvm_riscv_stage2_iounmap() functions.
These new functions for updating G-stage page table mappings will be called
in atomic context so we have special "in_atomic" parameter for this purpose.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_host.h
arch/riscv/kvm/mmu.c