Message ID | 20240229-kvm-arm64-group-fp-data-v2-0-276de0d550e8@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12787C48BF6 for <linux-arm-kernel@archiver.kernel.org>; Thu, 29 Feb 2024 21:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jHkwNACIAH0tSkLy1nE2eGxUyT/ndMdzkcZlj6w1AhI=; b=wqRbLx0lYAJ1Qp HKyBzCQoVQaJYd+wgX9nugXtDAjAQAPLSm/zbdkdqK1vNF8aUlTmwHGxAr2CwFrcSrcGy+G6l0Det 6bxmA3d+AFgGTTS+J9vv2WAN6ZyHMneH0xN4azJNVDTiJvbL9BYwMUdQDsqB1RBcjREwslyZaPKWp wZFnGySyrp3wSUz3T3WmB+OywmNpYvdo4A/c12fxY46LtdumcNDO8e7RvbHd4myzgA1dAZtJr9QOF J5kr1jh0fMHoL97NRY8eozXzqpXXIh7nKtylsi7uQrLGGFk9qhysCTUJWzy1idbtNI2Io0jVhcHX1 /WEf5xyCk5sUmeGV3JvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfoGt-0000000FNFo-1fut; Thu, 29 Feb 2024 21:48:55 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfoGq-0000000FNEq-2jDp for linux-arm-kernel@lists.infradead.org; Thu, 29 Feb 2024 21:48:53 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 135E960F93; Thu, 29 Feb 2024 21:48:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9948EC433C7; Thu, 29 Feb 2024 21:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709243331; bh=WzBVNuU8gyYdqlnWzHeJD0lxBnSeUPUhpjVNqPa44jw=; h=From:Subject:Date:To:Cc:From; b=ZDw7oitbKFVJM7q32xq0FubWrEZNpka1eFgbv6MixAG/ReUe4VJAmFg960pYSeqjV I4t36ZA7dp3H4/Do3fe8olClbttZDCrejqG6b+jODdo1uvhG3y4L6UDzL2ixgMpCMO o76SkwURe8C8p9maD9Lzx8DkeX+UJEwxJVyk73YmczdgZ2uwXm4VtEiYh4pnDtATme ZvbKJt5ExYi3icRTLMBPliIt1baXBxpH0t2jYvn4QjxC87xVmlt03yEoXj7Nx4X+of kVve1Hboo0hwjmam2GmRaRA1HwytulMGeL3Kdr0Eo3NN9kvJZlQMYp+9wSgObZXuBF ZQpWc6HshZ1SQ== From: Mark Brown <broonie@kernel.org> Subject: [PATCH v2 0/2] KVM: arm64: Store a cpu_fp_state directly in the vCPU data Date: Thu, 29 Feb 2024 21:47:33 +0000 Message-Id: <20240229-kvm-arm64-group-fp-data-v2-0-276de0d550e8@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHX74GUC/4WNTQ6CMBBGr0Jm7Zj+AdEV9zAsGhigQWgzxUZDu LuVC7h8L/net0MkdhThXuzAlFx0fs2gLgV0k11HQtdnBiWUEUpVOKcFLS+VwZH9K+AQsLebRWF JV7ojZQaCvA5Mg3uf5UebeXJx8/w5j5L82f/NJFGgqHup6/JWypqamXil59XzCO1xHF9yuuvMv wAAAA== To: Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org> X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=1489; i=broonie@kernel.org; h=from:subject:message-id; bh=WzBVNuU8gyYdqlnWzHeJD0lxBnSeUPUhpjVNqPa44jw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBl4Pu+i7B88JTtuAL3YxM8iBShhTXfFuBmsKTwDle7 XUORxkeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZeD7vgAKCRAk1otyXVSH0LPjB/ 0b7ehU+vSkSpFfFlsDZ/3eZq7Ic6P3SALmeFu4XqK0LCCqd9O5eZTgDZvuucbafviaa4RIyn0QGpxZ CgIE5K96VT1GQdJL+ZONRV4C8OF2Enlahogdtzl0kNSNjy4OuWSu2jUk2IpjiaAhIR7nPgDyBCeCc9 MfI+QXmxDwE4xP8xIWHeenTYySzu3ZdLMg2BCZXlKTG9DC3DKiP0KI7s9sdOdsciaSPAZA6Fx/sRY9 WsUpHLZ9iXvrysMjbfry2jP3ua5+9qjWh4L9V4DBkB+8Mp0XlUKhAc2wjWl81zkbEUT5ghzNptP4Ef +wUSne3o0RaMj860eHu2LVtgqpfXcR X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240229_134852_775120_C6DFA0BA X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: Store a cpu_fp_state directly in the vCPU data
|
expand
|
Simplify the binding of the guest state to the CPU when returning to the host by storing a copy of the structure used to pass the state in the vCPU data and initialising it during guest setup rather than creating a new copy each time we exit the guest. Signed-off-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Remove stale fp_state local. - Changelog updates. - Link to v1: https://lore.kernel.org/r/20240226-kvm-arm64-group-fp-data-v1-0-07d13759517e@kernel.org --- Mark Brown (2): KVM: arm64: Rename variable for tracking ownership of FP state KVM: arm64: Reuse struct cpu_fp_state to track the guest FP state arch/arm64/include/asm/kvm_emulate.h | 4 ++-- arch/arm64/include/asm/kvm_host.h | 25 ++++++++++++------------- arch/arm64/kvm/arm.c | 14 +++++++++++++- arch/arm64/kvm/fpsimd.c | 31 ++++++------------------------- arch/arm64/kvm/guest.c | 21 ++++++++++++++------- arch/arm64/kvm/hyp/include/hyp/switch.h | 6 +++--- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 9 +++++---- arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- arch/arm64/kvm/reset.c | 14 ++++++++------ 10 files changed, 65 insertions(+), 63 deletions(-) --- base-commit: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 change-id: 20240226-kvm-arm64-group-fp-data-0ae363ce24fe Best regards,