RISC-V: KVM: Define a probe function for SBI extension data structures
authorAtish Patra <atishp@rivosinc.com>
Sun, 5 Feb 2023 01:15:05 +0000 (17:15 -0800)
committerAnup Patel <anup@brainfault.org>
Tue, 7 Feb 2023 15:05:39 +0000 (20:35 +0530)
commit026bac4574b5da5aa8715bf60584679fa269eb14
tree17b3c21a98509d1a5525e5eaa2e97de66a31986d
parent2723fb7b1e3d331fe6ce04629be6f66898a4cf3b
RISC-V: KVM: Define a probe function for SBI extension data structures

Currently the probe function just checks if an SBI extension is
registered or not. However, the extension may not want to advertise
itself depending on some other condition.
An additional extension specific probe function will allow
extensions to decide if they want to be advertised to the caller or
not. Any extension that does not require additional dependency checks
can avoid implementing this function.

Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_vcpu_sbi.h
arch/riscv/kvm/vcpu_sbi_base.c