[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/17] target/riscv: Expose CPU options of WorldGuard
From: |
Jim Shu |
Subject: |
[PATCH 11/17] target/riscv: Expose CPU options of WorldGuard |
Date: |
Tue, 15 Apr 2025 16:12:25 +0800 |
Expose WG CPU extensions (Smwg, Sswg, Smwgd) and WG CPU configs
(mwid, mwidlist).
Signed-off-by: Jim Shu <jim.shu@sifive.com>
---
target/riscv/cpu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 1aba6dd853..46df970fe3 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1742,6 +1742,11 @@ const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[] = {
const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[] = {
MULTI_EXT_CFG_BOOL("x-svukte", ext_svukte, false),
+ /* RISC-V WorldGuard v0.4 */
+ MULTI_EXT_CFG_BOOL("x-smwg", ext_smwg, false),
+ MULTI_EXT_CFG_BOOL("x-smwgd", ext_smwgd, false),
+ MULTI_EXT_CFG_BOOL("x-sswg", ext_sswg, false),
+
{ },
};
@@ -2975,6 +2980,9 @@ static const Property riscv_cpu_properties[] = {
* it with -x and default to 'false'.
*/
DEFINE_PROP_BOOL("x-misa-w", RISCVCPU, cfg.misa_w, false),
+
+ DEFINE_PROP_UINT32("x-mwid", RISCVCPU, cfg.mwid, UINT32_MAX),
+ DEFINE_PROP_UINT32("x-mwidlist", RISCVCPU, cfg.mwidlist, UINT32_MAX),
};
#if defined(TARGET_RISCV64)
--
2.17.1
- [PATCH 02/17] accel/tcg: memory access from CPU will pass access_type to IOMMU, (continued)
- [PATCH 02/17] accel/tcg: memory access from CPU will pass access_type to IOMMU, Jim Shu, 2025/04/15
- [PATCH 03/17] exec: Add RISC-V WorldGuard WID to MemTxAttrs, Jim Shu, 2025/04/15
- [PATCH 04/17] hw/misc: riscv_worldguard: Add RISC-V WorldGuard global config, Jim Shu, 2025/04/15
- [PATCH 05/17] target/riscv: Add CPU options of WorldGuard CPU extension, Jim Shu, 2025/04/15
- [PATCH 06/17] target/riscv: Add hard-coded CPU state of WG extension, Jim Shu, 2025/04/15
- [PATCH 07/17] target/riscv: Add defines for WorldGuard CSRs, Jim Shu, 2025/04/15
- [PATCH 08/17] target/riscv: Allow global WG config to set WG CPU callbacks, Jim Shu, 2025/04/15
- [PATCH 10/17] target/riscv: Add WID to MemTxAttrs of CPU memory transactions, Jim Shu, 2025/04/15
- [PATCH 09/17] target/riscv: Implement WorldGuard CSRs, Jim Shu, 2025/04/15
- [PATCH 12/17] hw/misc: riscv_worldguard: Add API to enable WG extension of CPU, Jim Shu, 2025/04/15
- [PATCH 11/17] target/riscv: Expose CPU options of WorldGuard,
Jim Shu <=
- [PATCH 13/17] hw/misc: riscv_wgchecker: Implement RISC-V WorldGuard Checker, Jim Shu, 2025/04/15
- [PATCH 14/17] hw/misc: riscv_wgchecker: Implement wgchecker slot registers, Jim Shu, 2025/04/15
- [PATCH 17/17] hw/riscv: virt: Add WorldGuard support, Jim Shu, 2025/04/15
- [PATCH 16/17] hw/misc: riscv_wgchecker: Check the slot settings in translate, Jim Shu, 2025/04/15
- [PATCH 15/17] hw/misc: riscv_wgchecker: Implement correct block-access behavior, Jim Shu, 2025/04/15