Commit
7e4f75cadf ("target/riscv/tcg: hide warn for named feats when
disabling via priv_ver") changed the design of
disable_priv_spec_isa_exts to not warn when disabling what we were
calling "named features" at that time.
Back in that time we were adding RVA22 profile support and we were dealing
with a RVI innovation: named features. These can be define as cute
names for pre-existing behavior/parameters, e.g. 'zic64b' means all
cache blocks must have 64 bytes. They do get inserted in the riscv,isa
but they are not "real" extensions because users shouldn't be setting
them in the command line, or so we thought back then, and we attempted
to model that by calling it "named features".
This didn't age that well: ziccrse is a so called named feature as far as
TCG goes, but then KVM had to treat it as a regular extension that can be
user set and we made an exception: ziccrse is a named feature that is
user set by KVM.
"Named features" are regular extensions that might or might not be user
set, and might or might not warrant special handling during realize()
by setting other parameters. And we'll being treating them as such,
which will culminate in the end of riscv_cpu_named_features[] array in
the end.
This reverts commit
7e4f75cadf44ee67809c7ca82645a289a5268966.
Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <
20260512032926.
1978818-5-daniel.barboza@oss.qualcomm.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
}
isa_ext_update_enabled(cpu, edata->ext_enable_offset, false);
-
- /*
- * Do not show user warnings for named features that users
- * can't enable/disable in the command line. See commit
- * 68c9e54bea for more info.
- */
- if (cpu_cfg_offset_is_named_feat(edata->ext_enable_offset)) {
- continue;
- }
#ifndef CONFIG_USER_ONLY
warn_report("disabling %s extension for hart 0x%" PRIx64
" because privilege spec version does not match",
cpu->cfg.has_priv_1_13 = true;
}
+ /* zic64b is 1.12 or later */
cpu->cfg.ext_zic64b = cpu->cfg.cbom_blocksize == 64 &&
cpu->cfg.cbop_blocksize == 64 &&
- cpu->cfg.cboz_blocksize == 64;
+ cpu->cfg.cboz_blocksize == 64 &&
+ cpu->cfg.has_priv_1_12;
cpu->cfg.ext_ssstateen = cpu->cfg.ext_smstateen;