[PATCH v12 0/5] Another version of arm64 userspace counter access support.

Rob Herring robh at kernel.org
Mon Nov 15 08:57:34 PST 2021


On Wed, Oct 27, 2021 at 3:16 PM Rob Herring <robh at kernel.org> wrote:
>
> The arm64 support departs from the x86 implementation by requiring the user
> to explicitly request user access (via attr.config1) and only enables access
> for task bound events. Since usage is explicitly requested, access is
> enabled at perf_event_open() rather than on mmap() as that greatly
> simplifies the implementation. Rather than trying to lock down the access
> as the x86 implementation has been doing, we can start with only a limited
> use case enabled and later expand it if needed.
>
> I've run this version thru Vince's perf tests[14] with arm64 support added.
> I wish I'd found these tests sooner...
>
> This originally resurrected Raphael's series[1] to enable userspace counter
> access on arm64. My previous versions are here
> [2][3][4][5][6][7][8][9][10][11][12].
> A git branch is here[13].
>
> Changes in v12:
>  - Zero PMSELR_EL0 when userspace access is enabled
>  - Return -EOPNOTSUPP for if h/w doesn't support 64-bit counters

Will, the series rebases cleanly on v5.16-rc1. Please let me know if
you want me to resend.

Peter, Will is waiting on an ack on the core/x86 bits from you.

Rob



More information about the linux-arm-kernel mailing list