qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/5] Add ISA extension smcntrpmf support
@ 2024-02-28 18:51 Atish Patra
  2024-02-28 18:51 ` [PATCH v5 1/5] target/riscv: Fix the predicate functions for mhpmeventhX CSRs Atish Patra
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Atish Patra @ 2024-02-28 18:51 UTC (permalink / raw)
  Cc: Alistair Francis, Bin Meng, Daniel Henrique Barboza, Liu Zhiwei,
	Palmer Dabbelt, qemu-devel, qemu-riscv, Weiwei Li, kaiwenxue1

This patch series adds the support for RISC-V ISA extension smcntrpmf (cycle and
privilege mode filtering) [1]. It is based on Kevin's earlier work but improves
it by actually implement privilege mode filtering by tracking the privilege
mode switches. This enables the privilege mode filtering for mhpmcounters as
well. However, Smcntrpmf/Sscofpmf must be enabled to leverage this. This series
also modified to report the raw instruction count instead of virtual cpu time
based on the instruction count when icount is enabled. The former seems to be
the preferred approach for instruction count for other architectures as well.

Please let me know if anybody thinks that's incorrect.

The series is also available at

Changes from v4->v5:
1. Rebased on top of master(158a054c4d1a).
2. Fixed a bug for VS<->HS transition.

Changes from v3->v4:
1. Fixed the ordering of the ISA extension names in isa_edata_arr.
2. Added RB tags.

Changes from v2->v3:
1. Fixed the rebasing error in PATCH2.
2. Added RB tags.
3. Addressed other review comments. 

Changes from v1->v2:
1. Implemented actual mode filtering for both icount and host ticks mode.
1. Addressed comments in v1.
2. Added Kevin's personal email address.

[1] https://github.com/riscv/riscv-smcntrpmf
[2] https://github.com/atishp04/qemu/tree/smcntrpmf_v5

Atish Patra (2):
target/riscv: Fix the predicate functions for mhpmeventhX CSRs
target/riscv: Implement privilege mode filtering for cycle/instret

Kaiwen Xue (3):
target/riscv: Add cycle & instret privilege mode filtering properties
target/riscv: Add cycle & instret privilege mode filtering definitions
target/riscv: Add cycle & instret privilege mode filtering support

target/riscv/cpu.c        |   2 +
target/riscv/cpu.h        |  17 +++
target/riscv/cpu_bits.h   |  34 ++++++
target/riscv/cpu_cfg.h    |   1 +
target/riscv/cpu_helper.c |  17 ++-
target/riscv/csr.c        | 251 ++++++++++++++++++++++++++++++--------
target/riscv/pmu.c        |  64 ++++++++++
target/riscv/pmu.h        |   2 +
8 files changed, 335 insertions(+), 53 deletions(-)

--
2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-03-20  8:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 18:51 [PATCH v5 0/5] Add ISA extension smcntrpmf support Atish Patra
2024-02-28 18:51 ` [PATCH v5 1/5] target/riscv: Fix the predicate functions for mhpmeventhX CSRs Atish Patra
2024-03-05  7:03   ` LIU Zhiwei
2024-02-28 18:51 ` [PATCH v5 2/5] target/riscv: Add cycle & instret privilege mode filtering properties Atish Patra
2024-03-04 17:24   ` Daniel Henrique Barboza
2024-03-05  7:01   ` LIU Zhiwei
2024-03-07  9:27     ` Atish Patra
2024-02-28 18:51 ` [PATCH v5 3/5] target/riscv: Add cycle & instret privilege mode filtering definitions Atish Patra
2024-02-28 18:51 ` [PATCH v5 4/5] target/riscv: Add cycle & instret privilege mode filtering support Atish Patra
2024-02-28 18:51 ` [PATCH v5 5/5] target/riscv: Implement privilege mode filtering for cycle/instret Atish Patra
2024-03-05  6:47   ` LIU Zhiwei
2024-03-07  9:25     ` Atish Patra
2024-03-20  4:54       ` Alistair Francis
2024-03-20  7:21         ` Atish Patra
2024-03-20  8:06           ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).