summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/kvm_vcpu_sbi.h
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2022-12-07 09:17:27 +0530
committerAnup Patel <anup@brainfault.org>2022-12-07 09:17:27 +0530
commit23fe562e45c5959590a24d05c61c963f10ccb934 (patch)
tree7e51a6e4939ad44986dc01d75e47843335de08ce /arch/riscv/include/asm/kvm_vcpu_sbi.h
parente81af89baebf86938cda1a7c2bee51c676c04e21 (diff)
RISC-V: KVM: Move sbi related struct and functions to kvm_vcpu_sbi.h
Just like asm/kvm_vcpu_timer.h, we should have all sbi related struct and functions in asm/kvm_vcpu_sbi.h. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/include/asm/kvm_vcpu_sbi.h')
-rw-r--r--arch/riscv/include/asm/kvm_vcpu_sbi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/kvm_vcpu_sbi.h b/arch/riscv/include/asm/kvm_vcpu_sbi.h
index d4e3e600beef..f79478a85d2d 100644
--- a/arch/riscv/include/asm/kvm_vcpu_sbi.h
+++ b/arch/riscv/include/asm/kvm_vcpu_sbi.h
@@ -14,6 +14,10 @@
#define KVM_SBI_VERSION_MAJOR 1
#define KVM_SBI_VERSION_MINOR 0
+struct kvm_vcpu_sbi_context {
+ int return_handled;
+};
+
struct kvm_vcpu_sbi_extension {
unsigned long extid_start;
unsigned long extid_end;
@@ -31,7 +35,9 @@ void kvm_riscv_vcpu_sbi_forward(struct kvm_vcpu *vcpu, struct kvm_run *run);
void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu,
struct kvm_run *run,
u32 type, u64 flags);
+int kvm_riscv_vcpu_sbi_return(struct kvm_vcpu *vcpu, struct kvm_run *run);
const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext(unsigned long extid);
+int kvm_riscv_vcpu_sbi_ecall(struct kvm_vcpu *vcpu, struct kvm_run *run);
#ifdef CONFIG_RISCV_SBI_V01
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01;