[PATCH v3 24/42] KVM: arm64: Unconditionally configure fine-grain traps

Ben Horgan ben.horgan at arm.com
Tue Apr 29 07:09:54 PDT 2025


On 4/29/25 14:49, Marc Zyngier wrote:
> On Tue, 29 Apr 2025 14:08:27 +0100,
> Ben Horgan <ben.horgan at arm.com> wrote:
>>>    -	__deactivate_fgt(hctxt, vcpu, kvm, HFGRTR_EL2);
>>> -	if (cpus_have_final_cap(ARM64_WORKAROUND_AMPERE_AC03_CPU_38))
>> Don't we need to continue considering the ampere errata here? Or, at
>> least worth a mention in the commit message.
> 
> The FGT registers are always context switched, so whatever was saved
> *before* the workaround was applied in __activate_traps_hfgxtr() is
> blindly restored...
> 
>>> -		write_sysreg_s(ctxt_sys_reg(hctxt, HFGWTR_EL2), SYS_HFGWTR_EL2);
> 
> ... and this write always happens.
Thanks for the explanation. I now agree this code is correct.
> 
> 	M.
> 

Thanks,

Ben




More information about the linux-arm-kernel mailing list