Re: Non-idempotent PMA and table walk accesses


David Kruckemyer
 



On Tue, May 19, 2020 at 5:10 AM Nikhil Rishiyur <nikhil@...> wrote:
>    That sounds a bit like a performance counter to me, but it does
>    raise an interesting question whether "idempotent" in the
>    architectural sense is idempotent in a mathematical sense
>    (i.e. operations are repeatable with the same result) or in a
>    broader sense (e.g. inclusive of any side-effects even if the
>    values at the location don't change).

Whether one treats a performance counter as a 'benign side effect' or
not depends on what one does with it.  It could be merely passive
instrumentation to obtaim meta-information about program behavior. But
if the counter itself is observable to the program and can affect its
future behavior, then it's more serious.

Agreed that the counter in your example can be important to system operation.
 

I would avoid _requiring_ anything about itempotency in the spec, and
just leave it to commentary like this for the system designer to be
aware of the issues and to decide whether PTWs in their system can
happen in idempotent regions or not.

OK, I'm fine with this. I still think this PMA confounds the notion of idempotency with speculation control (i.e. whether a location has side-effects can be independent of whether SW wants to limit speculation to that location), which is ultimately a separate issue from the PTW issue.
 

Nikhil

Join {tech-privileged@lists.riscv.org to automatically receive all group messages.