[kvm-unit-tests PATCH 0/4] riscv: sbi: Add support to test PMU extension

James R T jamestiotio at gmail.com
Mon Dec 22 20:26:20 PST 2025


On Tue, Dec 23, 2025 at 1:25 AM Andrew Jones <andrew.jones at linux.dev> wrote:
>
> On Sat, Dec 13, 2025 at 11:08:44PM +0800, James Raphael Tiovalen wrote:
> > This patch series adds support for testing most of the SBI PMU
> > extension functions. The functions related to shared memory
> > (FID #7 and #8) are not tested yet.
> >
> > The first 3 patches add the required support for SBI PMU and some
> > helper functions, while the last patch adds the actual tests.
> >
> > James Raphael Tiovalen (4):
> >   lib: riscv: Add SBI PMU CSRs and enums
> >   lib: riscv: Add SBI PMU support
> >   lib: riscv: Add SBI PMU helper functions
> >   riscv: sbi: Add tests for PMU extension
> >
> >  riscv/Makefile      |   2 +
> >  lib/riscv/asm/csr.h |  31 +++
> >  lib/riscv/asm/pmu.h | 167 ++++++++++++++++
> >  lib/riscv/asm/sbi.h | 104 ++++++++++
> >  lib/riscv/pmu.c     | 169 ++++++++++++++++
> >  lib/riscv/sbi.c     |  73 +++++++
> >  riscv/sbi-tests.h   |   1 +
> >  riscv/sbi-pmu.c     | 461 ++++++++++++++++++++++++++++++++++++++++++++
> >  riscv/sbi.c         |   2 +
> >  9 files changed, 1010 insertions(+)
> >  create mode 100644 lib/riscv/asm/pmu.h
> >  create mode 100644 lib/riscv/pmu.c
> >  create mode 100644 riscv/sbi-pmu.c
> >
> > --
> > 2.43.0
> >
>
> Hi James,
>
> Thanks for posting this. I'll look at it as soon as possible, but I'm
> juggling some other stuff right now and also plan to be on vacation for
> a week starting tomorrow.
>
> Thanks,
> drew

Hi Andrew,

No worries. Feel free to look at the series whenever you manage to
find some time to do so.

Best regards,
James Raphael Tiovalen



More information about the kvm-riscv mailing list