At this moment ziccrse is a TCG always enable ext that has no flag. KVM will expose ziccrse to users, allowing them to turn it on/off.
Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com> --- target/riscv/cpu.c | 5 +++++ target/riscv/cpu_cfg.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 522d6584e4..0b8d2c0c25 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1711,6 +1711,11 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = { MULTI_EXT_CFG_BOOL("zvksc", ext_zvksc, false), MULTI_EXT_CFG_BOOL("zvksg", ext_zvksg, false), + /* + * KVM can turn it on/off. For TCG this is always + * enabled if priv_ver >= 1.11. + */ + MULTI_EXT_CFG_BOOL("ziccrse", ext_ziccrse, true), { }, }; diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h index 3f3c1118c0..88565e29fd 100644 --- a/target/riscv/cpu_cfg.h +++ b/target/riscv/cpu_cfg.h @@ -157,6 +157,9 @@ struct RISCVCPUConfig { bool ext_ssstateen; bool ext_sha; + /* Always enabled for TCG, KVM wants to switch it on/off */ + bool ext_ziccrse; + /* * Always 'true' booleans for named features * TCG always implement/can't be user disabled, -- 2.48.1