On Mon, 20 Sept 2021 at 02:29, Richard Henderson <richard.hender...@linaro.org> wrote: > > On 8/26/21 6:45 AM, Peter Maydell wrote: > > I don't think you should need to special case AArch64 vs AArch32 like this; > > you can do > > env->exception.vaddress = pc; > > env->exception.fsr = the_fsr; > > raise_exception(env, EXCP_PREFETCH_ABORT, syn_pcalignment(), target_el); > > > > for both. AArch64/AArch32-Hyp exception entry will ignore exception.fsr, > > and AArch32-not-Hyp entry will ignore exception.syndrome. > > Not true. The latter case still requires syndrome with EC_INSNABORT, etc.
For AArch32-not-Hyp ? Syndrome doesn't matter at all in that case (only Hyp mode and AArch64 have syndrome registers); it just needs to take the prefetch abort exception, which you get by using EXCP_PREFETCH_ABORT. -- PMM