Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-05-13 Thread Alistair Francis
On Tue, Apr 30, 2024 at 5:29 AM Atish Patra wrote: > > Currently, if a counter monitoring cycle/instret is stopped via > mcountinhibit we just update the state while the value is saved > during the next read. This is not accurate as the read may happen > many cycles after the counter is stopped. I

Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-05-10 Thread Andrew Jones
On Thu, May 09, 2024 at 01:26:56PM GMT, Atish Kumar Patra wrote: > On Thu, May 2, 2024 at 5:39 AM Andrew Jones wrote: > > > > On Tue, Apr 30, 2024 at 03:00:45PM GMT, Daniel Henrique Barboza wrote: > > > > > > > > > On 4/29/24 16:28, Atish Patra wrote: > > > > Currently, if a counter monitoring cyc

Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-05-09 Thread Atish Kumar Patra
On Thu, May 2, 2024 at 5:39 AM Andrew Jones wrote: > > On Tue, Apr 30, 2024 at 03:00:45PM GMT, Daniel Henrique Barboza wrote: > > > > > > On 4/29/24 16:28, Atish Patra wrote: > > > Currently, if a counter monitoring cycle/instret is stopped via > > > mcountinhibit we just update the state while th

Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-05-02 Thread Andrew Jones
On Tue, Apr 30, 2024 at 03:00:45PM GMT, Daniel Henrique Barboza wrote: > > > On 4/29/24 16:28, Atish Patra wrote: > > Currently, if a counter monitoring cycle/instret is stopped via > > mcountinhibit we just update the state while the value is saved > > during the next read. This is not accurate

Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-04-30 Thread Daniel Henrique Barboza
On 4/29/24 16:28, Atish Patra wrote: Currently, if a counter monitoring cycle/instret is stopped via mcountinhibit we just update the state while the value is saved during the next read. This is not accurate as the read may happen many cycles after the counter is stopped. Ideally, the read sho

[PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-04-29 Thread Atish Patra
Currently, if a counter monitoring cycle/instret is stopped via mcountinhibit we just update the state while the value is saved during the next read. This is not accurate as the read may happen many cycles after the counter is stopped. Ideally, the read should return the value saved when the counte