Re: [RFC PATCH 06/12] perf: Support extension of sample_regs
From: Peter Zijlstra
Date: Tue Jun 17 2025 - 09:38:36 EST
On Tue, Jun 17, 2025 at 08:14:36PM +0800, Mi, Dapeng wrote:
> > We're going to do a sane SIMD register set with variable width, and
> > reclaim the XMM regs from the normal set.
>
> Ok, so we need to add two width variables like
> sample_ext_regs_words_intr/user,
s/ext/simd/
Not sure it makes sense to have separate vector widths for kernel and
user regs, but sure.
> then reuse the XMM regs bitmap to represent the extend regs bitmap.
But its not extended; its the normal bitmap.
> Considering the OPMASK regs and APX
> extended GPRs have same bit-width (64 bits), we may have to combine them
> into a single bitmap, e.g. bits[15:0] represents R31~R16 and bits[23:16]
> represents OPMASK7 ~ OPMASK0.
Again confused, bits 0:23 are the normal registers (in a lunatic
order). The XMM regs are in 32:63 and will be free if the SIMD thing is
present.
SPP+APX should definitely go there.
Not sure about OPMASK; those really do belong with the SIMD state. Let
me go figure out what ARM and Risc-V look like in more detail.