[PATCH] arm64/fpsimd: Clarify the purpose of using last in fpsimd_save()

Marc Zyngier maz at kernel.org
Tue Feb 8 09:37:12 PST 2022


On Mon, 24 Jan 2022 16:11:15 +0000, Mark Brown wrote:
> When saving the floating point context in fpsimd_save() we always reference
> the state using last-> rather than using current->. Looking at the FP code
> in isolation the reason for this is not entirely obvious, it's done because
> when KVM is running it will bind the guest context and rely on the host
> writing out the guest state on context switch away from the guest.
> 
> There's a slight trick here in that KVM still uses TIF_FOREIGN_FPSTATE and
> TIF_SVE to communicate what needs to be saved, it maintains those flags
> and restores them when it is done running the guest so that the normal
> restore paths function when we return back to userspace.
> 
> [...]

Applied to next, thanks!

[1/1] arm64/fpsimd: Clarify the purpose of using last in fpsimd_save()
      commit: 432110cd83caa655c646ec5d8ca6a9e9afb9ccba

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.





More information about the linux-arm-kernel mailing list