aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2023-07-12 22:05:00 +0530
committerWill Deacon <will@kernel.org>2023-07-20 15:59:29 +0100
commit8659200f69310e1f0e9cea70ae0fd65b363f6c4e (patch)
tree7c20bb949756828764e6691868cfdcb872322a57
parent8f1e47ca04c993303013127407ce68e35ec38c08 (diff)
downloadkvmtool-8659200f69310e1f0e9cea70ae0fd65b363f6c4e.tar.gz
riscv: Add Ssaia extension support
When the Ssaia extension is available expose it to the guest. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20230712163501.1769737-9-apatel@ventanamicro.com Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--riscv/fdt.c1
-rw-r--r--riscv/include/kvm/kvm-config-arch.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/riscv/fdt.c b/riscv/fdt.c
index a76dc378..df71ed47 100644
--- a/riscv/fdt.c
+++ b/riscv/fdt.c
@@ -16,6 +16,7 @@ struct isa_ext_info {
struct isa_ext_info isa_info_arr[] = {
/* sorted alphabetically */
+ {"ssaia", KVM_RISCV_ISA_EXT_SSAIA},
{"sstc", KVM_RISCV_ISA_EXT_SSTC},
{"svinval", KVM_RISCV_ISA_EXT_SVINVAL},
{"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT},
diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h
index b12605d3..b0a7e256 100644
--- a/riscv/include/kvm/kvm-config-arch.h
+++ b/riscv/include/kvm/kvm-config-arch.h
@@ -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-ssaia", \
+ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSAIA], \
+ "Disable Ssaia Extension"), \
OPT_BOOLEAN('\0', "disable-sstc", \
&(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSTC], \
"Disable Sstc Extension"), \