[RFC 10/10] KVM: arm64: nv: Add new HDFGRTR2_GROUP & HDFGRTR2_GROUP based FGU handling

Marc Zyngier maz at kernel.org
Tue Aug 13 00:16:15 PDT 2024


On 2024-08-13 07:53, Anshuman Khandual wrote:
> On 8/4/24 16:35, Marc Zyngier wrote:
>> which shows that an SPMEVFILT2Rn_EL0 access from EL1 traps to EL2 if:
>> 
>> - either HDFGRTR2_EL2.nSPMEVTYPERn_EL0 == '0', (check)
>> - or MDCR_EL2.EnSPM == '0', (check)
>> - or SPMACCESSR_EL2<(UInt(SPMSELR_EL0.SYSPMUSEL) * 2) + 
>> 1:UInt(SPMSELR_EL0.SYSPMUSEL) * 2> == '00'
>> 
>> and that last condition requires some more handling as you need to
>> evaluate both SPMSELR_EL0.SYSPMUSEL and the corresponding field of
>> SPMACCESSR_EL2 to make a decision. It's not majorly complicated, but
>> it isn't solved by simply setting a static attribute.
> 
> So IIUC you are suggesting to handle SYS_SPMEVFILT2R_EL0() registers 
> via
> complex condition checks where the CGT_XXX can be directed to a 
> function
> callback instead ? For example, something like the following 
> (untested).

[...]

Something like that, yes.

         M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list