On Mon, 19 Jan 2026, Cornelia Huck wrote:
Note: this is on top of <[email protected]> ("[PATCH v3 0/2] arm: move DCZID_EL0 to idregs array")While trying to move to an autogenerated cpu-sysregs.h.inc (so that we may keep a common view on registers), we should first address the ID registers that are still kept outside of ARMISARegisters. Other than DCZID_EL0 (addressed by the series this one goes on top of), that's the CCSIDR_EL1 values kept in cpu->cssidr[] (indexed via CSSELR_EL1.) My idea was to provide {GET,SET}_IDREG_DEMUX helper that work similar to {GET,SET}_IDREG and operate on a two-dimensional array. As a side effect, this also allows to get the values KVM provides for CCSIDR_EL1 (which are virtualized as well.) RFC because there are still some open questions: - The demux array cannot easily be autogenerated. We can get rid of the ccsidr[] array, but we now have an autogenerated entry in the non-demux array that does nothing. Both are not that nice. - I'm not sure if we need any compat handling for KVM (on TCG, everything should stay the same.) In theory, the KVM interface allows setting values from userspace (I didn't try.) - There's a slight disagreement between the current code (providing 16 entries for CCSIDR_EL1) and the KVM code (providing (7 cache levels) * (data/unified, instruction) = 14 entries.) With FEAT_MTE2, we might be needing 7 more entries.
LGTM! Reviewed-by: Sebastian Ott <[email protected]> Thanks, Sebastian
