Skip to content

riscv: sbi: Add support to test PMU extension

James Raphael Tiovalen kvm kvm-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib: riscv: Add SBI PMU CSRs and enumslib/riscv/asm/csr.h lib/riscv/asm/sbi.h+113 -00 replies
2/4lib: riscv: Add SBI PMU supportlib/riscv/asm/sbi.h lib/riscv/sbi.c+95 -00 replies
3/4lib: riscv: Add SBI PMU helper functionslib/riscv/asm/pmu.h lib/riscv/pmu.c riscv/Makefile+337 -00 replies
4/4riscv: sbi: Add tests for PMU extensionriscv/Makefile riscv/sbi-pmu.c riscv/sbi-tests.h +1 more+465 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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