On Wed, Oct 25, 2023 at 10:49:56AM -0300, Daniel Henrique Barboza wrote: > We already track user choice for multi-letter extensions because we > needed to honor user choice when enabling/disabling extensions during > realize(). We refrained from adding the same mechanism for MISA > extensions since we didn't need it. > > Profile support requires tne need to check for user choice for MISA > extensions, so let's add the corresponding hash now. It works like the > existing multi-letter hash (multi_ext_user_opts) but tracking MISA bits > options in the cpu_set_misa_ext_cfg() callback. > > Note that we can't re-use the same hash from multi-letter extensions > because that hash uses cpu->cfg offsets as keys, while for MISA > extensions we're using MISA bits as keys. > > After adding the user hash in cpu_set_misa_ext_cfg(), setting default > values with object_property_set_bool() in add_misa_properties() will end > up marking the user choice hash with them. Set the default value > manually to avoid it. > > Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com> > Reviewed-by: Alistair Francis <alistair.fran...@wdc.com> > Reviewed-by: LIU Zhiwei <zhiwei_...@linux.alibaba.com> > --- > target/riscv/tcg/tcg-cpu.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) >
Reviewed-by: Andrew Jones <ajo...@ventanamicro.com>