RISC-V: KVM: Allow some SBI extensions to be disabled by default
authorAnup Patel <apatel@ventanamicro.com>
Wed, 11 Oct 2023 12:22:26 +0000 (17:52 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 20 Oct 2023 11:20:33 +0000 (16:50 +0530)
commit56d8a385b60556019ecb45d6098830c9ef6a13e0
treece9152dd16d33ef4067737137c16200a4fed0f73
parentb88e87a0a1ec0aa10861d84f8321743902583443
RISC-V: KVM: Allow some SBI extensions to be disabled by default

Currently, all SBI extensions are enabled by default which is
problematic for SBI extensions (such as DBCN) which are forwarded
to the KVM user-space because we might have an older KVM user-space
which is not aware/ready to handle newer SBI extensions. Ideally,
the SBI extensions forwarded to the KVM user-space must be
disabled by default.

To address above, we allow certain SBI extensions to be disabled
by default so that KVM user-space must explicitly enable such
SBI extensions to receive forwarded calls from Guest VCPU.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_vcpu_sbi.h
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_sbi.c