On Sun, Aug 23, 2026 at 02:18:15PM +0100, Wei-Lin Chang wrote: > On Fri, Aug 21, 2026 at 11:19:30PM +0100, Mark Brown wrote:
> > As the comment mentions it's not quite that - ELFromSPSR() in the
> > pseudocode has rather more going on in it that I'd managed to convince
> > myself wasn't relevant in this specific context. I didn't want to give
> > it a name that would cause someone to think it did the full thing and
> > trip them up using it in a different context where those things do
> > matter. I do agree that this results in awkward naming.
> Right sorry, I missed the pseudocode part. ELFromSPSR pseudocode is
> doing more than what its name indicates...
> If we want to stick with the pseudocode then what do you think about
> el_from_spsr_nocheck/el_from_spsr_raw?
Yeah, those names could help though given your other comment about this
not looking the same as the code in exception.c I ended up changing it
to this:
/* Check the EL only, ignore thread mode */
pstate = vcpu->arch.ctxt.regs.pstate;
cur_mode = (pstate & PSR_MODE_MASK) | PSR_MODE_THREAD_BIT;
target_mode = (spsr & PSR_MODE_MASK) | PSR_MODE_THREAD_BIT;
instead.
signature.asc
Description: PGP signature

