Newer versions of QEMU (7.1.0) will append toThis code was originally written under the riscv,isa propertyassumption that the ISA
indicating the presence of pseudo-extensions such as Zfenceistring would only contain single-letter extensions. ThisThe RISC-V
breaks some assumptions about how to parsespecification has extended its description of the string, and triggers aformat quite a bit,
KASSERT about the expected lengthallowing for much longer ISA strings containing multi-letter extension
names.
For example, what is generated with a default virt instance:Newer versions of QEMU (7.1.0) will append to the riscv,isa property
cpu@0 {indicating the presence of multi-letter standard extensions such as
...Zfencei. This triggers a KASSERT about the expected length of the
riscv,isa = "rv64imafdch_zicsr_zifencei_zba_zbb_zbc_zbs";
}string, preventing boot.
AllocatIncrease the buffer forsize of the property dynamicallyisa array significantly, and stop when weteach the code
encounter an underscore.to parse multi-letter extensions, This is a stop-gap to quickly fix booting withand optional extension version
QEMU,numbers. and in our CI.We currently ignore them completely, Future changebut this will be made to handle this betterchange in
and parse morethe future as we start supporting supervisor-level extensions.