diff options
author | Anup Patel <apatel@ventanamicro.com> | 2023-07-12 22:04:58 +0530 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-07-20 15:59:29 +0100 |
commit | 8c1584e776a48d5dc2343e1a5d8d3b44883d9f63 (patch) | |
tree | d0feca47b4525faac74e88a1357abd898bf482e8 | |
parent | b346fabe6d2c4cc8e926fd0a0bbc7bc1758963e6 (diff) | |
download | kvmtool-8c1584e776a48d5dc2343e1a5d8d3b44883d9f63.tar.gz |
riscv: Add zbb extension support
The zbb extension allows software to use basic bitmanip instructions.
Let us add the zbb extension to the Guest device tree whenever it is
supported by the host.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20230712163501.1769737-7-apatel@ventanamicro.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | riscv/fdt.c | 1 | ||||
-rw-r--r-- | riscv/include/kvm/kvm-config-arch.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/riscv/fdt.c b/riscv/fdt.c index 977e9628..17d67577 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -19,6 +19,7 @@ struct isa_ext_info isa_info_arr[] = { {"sstc", KVM_RISCV_ISA_EXT_SSTC}, {"svinval", KVM_RISCV_ISA_EXT_SVINVAL}, {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, + {"zbb", KVM_RISCV_ISA_EXT_ZBB}, {"zicbom", KVM_RISCV_ISA_EXT_ZICBOM}, {"zihintpause", KVM_RISCV_ISA_EXT_ZIHINTPAUSE}, }; diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 56676e3a..8448b1a5 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -34,6 +34,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-svpbmt", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SVPBMT], \ "Disable Svpbmt Extension"), \ + OPT_BOOLEAN('\0', "disable-zbb", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZBB], \ + "Disable Zbb Extension"), \ OPT_BOOLEAN('\0', "disable-zicbom", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZICBOM], \ "Disable Zicbom Extension"), \ |