From: Marc Zyngier Subject: Re: [PATCH v5 14/14] KVM: arm64: Invoke FPSIMD context switch trap from C Date: Tue, 8 May 2018 12:03:05 +0100 Message-ID: <5dc80121-63a2-3bf1-e24a-a8909fadea20@arm.com> References: <1525449935-31424-1-git-send-email-Dave.Martin@arm.com> <1525449935-31424-15-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-15-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: > The conversion of the FPSIMD context switch trap code to C has added > some overhead to calling it, due to the need to save registers that > the procedure call standard defines as caller-saved. > > So, perhaps it is no longer worth invoking this trap handler quite > so early. > > Instead, we can invoke it from fixup_guest_exit(), with little > likelihood of increasing the overhead much further. > > As a convenience, this patch gives __hyp_switch_fpsimd() the same > return semantics fixup_guest_exit(). For now there is no > possibility of a spurious FPSIMD trap, so the function always > returns true, but this allows it to be tail-called with a single > return statement. > > Signed-off-by: Dave Martin Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...