Re: [PATCH v15 4/6] KVM: arm64: Set PSTATE.EXLOCK when entering an exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 20, 2025 at 11:02:11PM +0100, Marc Zyngier wrote:
> Mark Brown <broonie@xxxxxxxxxx> wrote:

> > As per DDI 0487 RWTXBY we need to manage PSTATE.EXLOCK when entering an

> Nit: please use an underscore between the type of a statement and its
> "name", as it makes it a bit more readable (R_WTXBY).

Updated as you request.  I have seen both usages - the non _ version
plays nicer with searching the PDF to find the rules since you can just
copy it directly into a PDF viewer.

> > +	// EL, or to GCSCR_ELx.EXLOCKEN for an exception to the same
> > +	// exception level.  See ARM DDI 0487 RWTXBY, D.1.3.2 in K.a.
> > +	new |= enter_exception64_gcs(vcpu, mode, target_mode);
> > +
> >  	new |= PSR_D_BIT;
> >  	new |= PSR_A_BIT;
> >  	new |= PSR_I_BIT;

> But that's not the only case where we have to deal with EXLOCK, is it?
> What of ERET and its PAuth variants? R_TYTWB says:

> <quote>
> If in AArch64 state, any of the following situations can cause an
> illegal exception return:
> 
> [...]
> 
> - If the Effective value of GCSCR_ELx.EXLOCKEN is 1 and PSTATE.EXLOCK
>   is 0, the execution of an exception return instruction to return to
>   the current Exception level ELx.
> </quote>

> My reading of the spec is that this needs handling.

Am I right in thinking that this handling is needed for the NV case
only?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux