summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2022-01-31 11:59:44 +0530
committerAnup Patel <anup@brainfault.org>2022-03-11 19:02:37 +0530
commitc9d3b5bd2693a17f078b1d8bdca440db5baa458c (patch)
tree5a84d67ff39189b70f503d1acd5a18002e651909 /arch/riscv/include
parentc38ff47bf094dc776ad4b586e47c4a7077a94f28 (diff)
downloadlinux-stable-c9d3b5bd2693a17f078b1d8bdca440db5baa458c.tar.gz
linux-stable-c9d3b5bd2693a17f078b1d8bdca440db5baa458c.tar.bz2
linux-stable-c9d3b5bd2693a17f078b1d8bdca440db5baa458c.zip
RISC-V: KVM: Add common kvm_riscv_vcpu_wfi() function
The wait for interrupt (WFI) instruction emulation can share the VCPU halt logic with SBI HSM suspend emulation so this patch adds a common kvm_riscv_vcpu_wfi() function 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>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/kvm_host.h b/arch/riscv/include/asm/kvm_host.h
index 99ef6a120617..78da839657e5 100644
--- a/arch/riscv/include/asm/kvm_host.h
+++ b/arch/riscv/include/asm/kvm_host.h
@@ -228,6 +228,7 @@ void kvm_riscv_stage2_vmid_update(struct kvm_vcpu *vcpu);
void __kvm_riscv_unpriv_trap(void);
+void kvm_riscv_vcpu_wfi(struct kvm_vcpu *vcpu);
unsigned long kvm_riscv_vcpu_unpriv_read(struct kvm_vcpu *vcpu,
bool read_insn,
unsigned long guest_addr,