mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-19 03:53:51 -04:00
Define the expected architecture specific exit reason for a successful ucall so that common tests can assert that a ucall occurred without the test needing to implement arch specific code. Suggested-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20230731203026.1192091-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
21 lines
424 B
C
21 lines
424 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef SELFTEST_KVM_UCALL_H
|
|
#define SELFTEST_KVM_UCALL_H
|
|
|
|
#include "processor.h"
|
|
|
|
#define UCALL_EXIT_REASON KVM_EXIT_RISCV_SBI
|
|
|
|
static inline void ucall_arch_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
|
|
{
|
|
}
|
|
|
|
static inline void ucall_arch_do_ucall(vm_vaddr_t uc)
|
|
{
|
|
sbi_ecall(KVM_RISCV_SELFTESTS_SBI_EXT,
|
|
KVM_RISCV_SELFTESTS_SBI_UCALL,
|
|
uc, 0, 0, 0, 0, 0);
|
|
}
|
|
|
|
#endif
|