[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <39b14f98acfa1afcbdcb46950c62e6c7@kernel.org>
Date: Tue, 13 Aug 2024 08:16:15 +0100
From: Marc Zyngier <maz@...nel.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-arm-kernel@...ts.infradead.org, Oliver Upton
<oliver.upton@...ux.dev>, James Morse <james.morse@....com>, Suzuki K
Poulose <suzuki.poulose@....com>, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Mark Brown <broonie@...nel.org>,
kvmarm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [RFC 10/10] KVM: arm64: nv: Add new HDFGRTR2_GROUP &
HDFGRTR2_GROUP based FGU handling
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...
Powered by blists - more mailing lists