On Sun, 17 Apr 2022 at 19:21, Richard Henderson <richard.hender...@linaro.org> wrote: > > More gracefully handle cpregs when EL2 and/or EL3 are missing. > If the reg is entirely inaccessible, do not register it at all. > If the reg is for EL2, and EL3 is present but EL2 is not, > squash to ARM_CP_CONST.
I don't think we should do this unconditionally. Just because the architecture usually defines that an _EL2 register is RES0 if EL2 is not present doesn't mean that it does so for every register or that it guarantees that it will continue to do so in future. (For instance I found ZCR_EL2 and TFSR_EL2 don't have that statement in their documentation, which might or might not be an oversight.) You could add an ARM_CP_ flag for "RES0 if no EL2" or something I guess? thanks -- PMM