riscv: Add Ztso extensiona support
When the Ztso 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>
Link: https://lore.kernel.org/r/20240514054928.854419-3-apatel@ventanamicro.com
Signed-off-by: Will Deacon <will@kernel.org>
diff --git a/riscv/fdt.c b/riscv/fdt.c
index cc8070d..418b668 100644
--- a/riscv/fdt.c
+++ b/riscv/fdt.c
@@ -48,6 +48,7 @@
{"zksed", KVM_RISCV_ISA_EXT_ZKSED},
{"zksh", KVM_RISCV_ISA_EXT_ZKSH},
{"zkt", KVM_RISCV_ISA_EXT_ZKT},
+ {"ztso", KVM_RISCV_ISA_EXT_ZTSO},
{"zvbb", KVM_RISCV_ISA_EXT_ZVBB},
{"zvbc", KVM_RISCV_ISA_EXT_ZVBC},
{"zvfh", KVM_RISCV_ISA_EXT_ZVFH},
diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h
index e562d71..7cfbf30 100644
--- a/riscv/include/kvm/kvm-config-arch.h
+++ b/riscv/include/kvm/kvm-config-arch.h
@@ -121,6 +121,9 @@
OPT_BOOLEAN('\0', "disable-zkt", \
&(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZKT], \
"Disable Zkt Extension"), \
+ OPT_BOOLEAN('\0', "disable-ztso", \
+ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZTSO], \
+ "Disable Ztso Extension"), \
OPT_BOOLEAN('\0', "disable-zvbb", \
&(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZVBB], \
"Disable Zvbb Extension"), \