On Thu, 6 Mar 2025 at 16:39, Peter Maydell <peter.mayd...@linaro.org> wrote: > > In the Arm ARM, rule R_TYTWB states that returning to AArch32 > is an illegal exception return if: > * AArch32 is not supported at any exception level > * the target EL is configured for AArch64 via SCR_EL3.RW > or HCR_EL2.RW or via CPU state at reset > > We check the second of these, but not the first (which can only be > relevant for the case of a return to EL0, because if AArch32 is not > supported at one of the higher ELs then the RW bits will have an > effective value of 1 and the the "configured for AArch64" condition > will hold also). > > Add the missing condition. This isn't currently a bug because > all our CPUs support AArch32 at EL0, but future CPUs we add > might be 64-bit only.
I noticed today that actually we do already have a pure AArch64 CPU: a64fx. What saves us is that guests aren't silly enough to deliberately try to return to nonexistent execution states. I'll tweak the commit message to suit. -- PMM