[PATCH 6/7] lib: sbi: Rework load/store emulator instruction decoding

Andrew Jones andrew.jones at oss.qualcomm.com
Tue Feb 10 08:08:19 PST 2026


On Tue, Feb 10, 2026 at 01:40:43AM -0800, Bo Gan wrote:
...
> Validation:
> The patch is validated to have fixed the issue with test cases running
> on a modified version of QEMU that exposes misaligned faults [1], and
> a further modified version that removes tinst transformation [2]. The
> S-mode OS is a local build of Debian Trixie 6.12 kernel that enables
> COMPAT (RV32), and the U-mode test application exercises all integer
> and floating-point load/store (RVIFD64/32+RVC64/32) instructions with
> all possible imm values. The patch is also tested on real HW (Sifive
> P550/ESWIN EIC7700), which only supports RV64. On P550, the same test
> was validated both in U mode and VU mode, where the host runs a 6.12
> ESWIN vendor kernel that has some ESWIN SoC device driver patches [3]
> applied, and the guest runs the exact same Debian Trixie 6.12 kernel
> mentioned above.
> 
> [1] https://github.com/ganboing/qemu/tree/ganboing-misalign
> [2] https://github.com/ganboing/qemu/tree/ganboing-misalign-no-tinst
> [3] https://github.com/sifiveinc/riscv-linux/tree/rel/kernel-6.12/hifive-premier-p550
>

Hi Bo,

It'd be nice if we could integrate emulation tests into a test suite that
gets run frequently in order to catch regressions. We have already started
using the kvm-unit-tests[4] framework for SBI testing so adding emulation
tests there would make sense. If special QEMU behavior is needed then we
should get cpu properties that enable those behaviors upstreamed so we can
turn them on when running the tests.

[4] https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Thanks,
drew



More information about the opensbi mailing list