[PATCH v3 9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0
Radim Krčmář
rkrcmar at ventanamicro.com
Mon May 26 02:00:30 PDT 2025
2025-05-23T10:16:11-07:00, Atish Patra <atish.patra at linux.dev>:
> On 5/23/25 6:31 AM, Radim Krčmář wrote:
>> 2025-05-22T12:03:43-07:00, Atish Patra <atishp at rivosinc.com>:
>>> Upgrade the SBI version to v3.0 so that corresponding features
>>> can be enabled in the guest.
>>>
>>> Signed-off-by: Atish Patra <atishp at rivosinc.com>
>>> ---
>>> diff --git a/arch/riscv/include/asm/kvm_vcpu_sbi.h b/arch/riscv/include/asm/kvm_vcpu_sbi.h
>>> -#define KVM_SBI_VERSION_MAJOR 2
>>> +#define KVM_SBI_VERSION_MAJOR 3
>> I think it's time to add versioning to KVM SBI implementation.
>> Userspace should be able to select the desired SBI version and KVM would
>> tell the guest that newer features are not supported.
>
> We can achieve that through onereg interface by disabling individual SBI
> extensions.
> We can extend the existing onereg interface to disable a specific SBI
> version directly
> instead of individual ones to save those IOCTL as well.
Yes, I am all in favor of letting userspace provide all values in the
BASE extension.
More information about the kvm-riscv
mailing list