RISC-V: KVM: Introduce range based local HFENCE functions
authorAnup Patel <apatel@ventanamicro.com>
Mon, 9 May 2022 05:13:52 +0000 (10:43 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 20 May 2022 03:39:09 +0000 (09:09 +0530)
commit2415e46e3a9a22c80eddc41dc9cb0b06fe0cd5e9
tree7a23d030a7a214c983efac02485b5bd39461655f
parentc7fa3c48de86053b0f1949fa5532082544e30fce
RISC-V: KVM: Introduce range based local HFENCE functions

Various  __kvm_riscv_hfence_xyz() functions implemented in the
kvm/tlb.S are equivalent to corresponding HFENCE.GVMA instructions
and we don't have range based local HFENCE functions.

This patch provides complete set of local HFENCE functions which
supports range based TLB invalidation and supports HFENCE.VVMA
based functions. This is also a preparatory patch for upcoming
Svinval support in KVM RISC-V.

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
arch/riscv/kvm/tlb.S [deleted file]
arch/riscv/kvm/tlb.c [new file with mode: 0644]
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vmid.c