[kvm-unit-tests PATCH v9 0/6] riscv: add SBI SSE extension tests

Andrew Jones andrew.jones at linux.dev
Fri Mar 14 07:34:29 PDT 2025


On Fri, Mar 14, 2025 at 03:23:39PM +0100, Clément Léger wrote:
> 
> 
> On 14/03/2025 15:19, Andrew Jones wrote:
> > On Fri, Mar 14, 2025 at 12:10:23PM +0100, Clément Léger wrote:
> >> This series adds tests for SBI SSE extension as well as needed
> >> infrastructure for SSE support. It also adds test specific asm-offsets
> >> generation to use custom OFFSET and DEFINE from the test directory.
> > 
> > Is there an opensbi branch I should be using to test this? There are
> > currently 54 failures reported with opensbi's master branch, and, with
> > opensbi v1.5.1, which is the version provided by qemu's master branch,
> > I get a crash which leads to a recursive stack walk. The crash occurs
> > in what I'm guessing is sbi_sse_inject() by the last successful output.
> 
> Yeah that's due to a6/a7 being inverted at injection time.
> 
> > 
> > I can't merge this without it skipping/kfailing with qemu's opensbi,
> > otherwise it'll fail CI. We could change CI to be more tolerant, but I'd
> > rather use kfail instead, and of course not crash.
> 
> Yes, the branch dev/cleger/sse on github can be used:
> 
> https://github.com/rivosinc/opensbi/tree/dev/cleger/sse
> 
> I'm waiting for the specification error changes to be merged before
> sending this one.

While ugly, I'm not opposed to doing an SBI implementation ID and
version check at the entry of the SSE tests and then just SKIP
when we detect opensbi and not a late enough version of it. If we
go that route, then please create a separate patch that adds a
couple functions in lib/riscv/sbi allowing all sbi unit tests to
easily check for specific SBI implementations and versions. (We'll
probably want to steal the kernel's sbi_mk_version and add an enum
or defines for the SBI implementation IDs.)

Thanks,
drew



More information about the kvm-riscv mailing list