1b35f4c73SSean Christopherson /* SPDX-License-Identifier: GPL-2.0-only */
2b35f4c73SSean Christopherson #ifndef SELFTEST_KVM_UCALL_H
3b35f4c73SSean Christopherson #define SELFTEST_KVM_UCALL_H
4b35f4c73SSean Christopherson 
5b35f4c73SSean Christopherson #include "processor.h"
6b35f4c73SSean Christopherson 
7*edb5b700SSean Christopherson #define UCALL_EXIT_REASON       KVM_EXIT_RISCV_SBI
8*edb5b700SSean Christopherson 
ucall_arch_init(struct kvm_vm * vm,vm_paddr_t mmio_gpa)9b35f4c73SSean Christopherson static inline void ucall_arch_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
10b35f4c73SSean Christopherson {
11b35f4c73SSean Christopherson }
12b35f4c73SSean Christopherson 
ucall_arch_do_ucall(vm_vaddr_t uc)13b35f4c73SSean Christopherson static inline void ucall_arch_do_ucall(vm_vaddr_t uc)
14b35f4c73SSean Christopherson {
15b35f4c73SSean Christopherson 	sbi_ecall(KVM_RISCV_SELFTESTS_SBI_EXT,
16b35f4c73SSean Christopherson 		  KVM_RISCV_SELFTESTS_SBI_UCALL,
17b35f4c73SSean Christopherson 		  uc, 0, 0, 0, 0, 0);
18b35f4c73SSean Christopherson }
19b35f4c73SSean Christopherson 
20b35f4c73SSean Christopherson #endif
21