ucall.h 441 B

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