Re: [ RFC v2 1/9] target/riscv: Fix PMU CSR predicate function

2021-09-16 Thread Atish Patra
On Wed, Sep 15, 2021 at 7:51 AM Bin Meng wrote: > > On Fri, Sep 10, 2021 at 4:27 AM Atish Patra wrote: > > > > Currently, the predicate function for PMU related CSRs only works if > > virtualization is enabled. Ideally, they should check the mcountern > > bits before cycle/minstret/hpmcounterx ac

Re: [ RFC v2 1/9] target/riscv: Fix PMU CSR predicate function

2021-09-15 Thread Bin Meng
On Fri, Sep 10, 2021 at 4:27 AM Atish Patra wrote: > > Currently, the predicate function for PMU related CSRs only works if > virtualization is enabled. Ideally, they should check the mcountern > bits before cycle/minstret/hpmcounterx access. The predicate function > also calculates the counter in

[ RFC v2 1/9] target/riscv: Fix PMU CSR predicate function

2021-09-09 Thread Atish Patra
Currently, the predicate function for PMU related CSRs only works if virtualization is enabled. Ideally, they should check the mcountern bits before cycle/minstret/hpmcounterx access. The predicate function also calculates the counter index incorrectly for hpmcounterx. Signed-off-by: Atish Patra