@@ -16,6 +16,7 @@ struct isa_ext_info {
struct isa_ext_info isa_info_arr[] = {
/* sorted alphabetically */
+ {"smstateen", KVM_RISCV_ISA_EXT_SMSTATEEN},
{"ssaia", KVM_RISCV_ISA_EXT_SSAIA},
{"sstc", KVM_RISCV_ISA_EXT_SSTC},
{"svinval", KVM_RISCV_ISA_EXT_SVINVAL},
@@ -25,6 +25,9 @@ struct kvm_config_arch {
OPT_U64('\0', "custom-mimpid", \
&(cfg)->custom_mimpid, \
"Show custom mimpid to Guest VCPU"), \
+ OPT_BOOLEAN('\0', "disable-smstateen", \
+ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SMSTATEEN], \
+ "Disable Smstateen Extension"), \
OPT_BOOLEAN('\0', "disable-ssaia", \
&(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSAIA], \
"Disable Ssaia Extension"), \
When the Smstateen extension is available expose it to the guest via device tree so that guest can use it. Signed-off-by: Anup Patel <apatel@ventanamicro.com> --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+)