From: Marc Zyngier Subject: Re: [PATCH v5 05/14] arm64: fpsimd: Generalise context saving for non-task contexts Date: Tue, 8 May 2018 10:20:36 +0100 Message-ID: References: <1525449935-31424-1-git-send-email-Dave.Martin@arm.com> <1525449935-31424-6-git-send-email-Dave.Martin@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1525449935-31424-6-git-send-email-Dave.Martin@arm.com> Content-Language: en-GB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Dave Martin , kvmarm@lists.cs.columbia.edu Cc: Catalin Marinas , Christoffer Dall , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel List-Id: kvmarm@lists.cs.columbia.edu On 04/05/18 17:05, Dave Martin wrote: > In preparation for allowing non-task (i.e., KVM vcpu) FPSIMD > contexts to be handled by the fpsimd common code, this patch adapts > task_fpsimd_save() to save back the currently loaded context, > removing the explicit dependency on current. > > The relevant storage to write back to in memory is now found by > examining the fpsimd_last_state percpu struct. > > fpsimd_save() does nothing unless TIF_FOREIGN_FPSTATE is clear, and > fpsimd_last_state is updated under local_bh_disable() or > local_irq_disable() everywhere that TIF_FOREIGN_FPSTATE is cleared: > thus, fpsimd_save() will write back to the correct storage for the > loaded context. > > No functional change. > > Signed-off-by: Dave Martin Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...