target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext()
commit63c7eedc28f25141a44e34534c6b5317caaf38cc
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Thu, 6 Jul 2023 10:17:34 +0000 (6 07:17 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 10 Jul 2023 12:29:20 +0000 (10 22:29 +1000)
tree2eacb1325804235c49eb109ecd5ac696713c0362
parentb71f9dcada2edacfa9baaf872de717c903fb333b
target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext()

riscv_isa_string_ext() is being used by riscv_isa_string(), which is
then used by boards to retrieve the 'riscv,isa' string to be written in
the FDT. All this happens after riscv_cpu_realize(), meaning that we're
already past riscv_cpu_validate_set_extensions() and, more important,
riscv_cpu_disable_priv_spec_isa_exts().

This means that all extensions that needed to be disabled due to
priv_spec mismatch are already disabled. Checking this again during
riscv_isa_string_ext() is unneeded. Remove it.

As a bonus, riscv_isa_string_ext() can now be used with the 'host'
KVM-only CPU type since it doesn't have a env->priv_ver assigned and it
would fail this check for no good reason.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230706101738.460804-17-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c