From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, broonie@kernel.org
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.15 v3 01/11] KVM: arm64: Get rid of host SVE tracking/saving
Date: Thu, 10 Apr 2025 11:54:41 -0400 [thread overview]
Message-ID: <20250410112209-863d60ce97fc4e9f@stable.kernel.org> (raw)
In-Reply-To: <20250408-stable-sve-5-15-v3-1-ca9a6b850f55@kernel.org>
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
⚠️ Found follow-up fixes in mainline
The upstream commit SHA1 provided is correct: 8383741ab2e773a992f1f0f8acdca5e7a4687c49
WARNING: Author mismatch between patch and upstream commit:
Backport author: Mark Brown<broonie@kernel.org>
Commit author: Marc Zyngier<maz@kernel.org>
Status in newer kernel trees:
6.14.y | Present (exact SHA1)
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (exact SHA1)
6.1.y | Present (exact SHA1)
Found fixes commits:
d52d165d67c5 KVM: arm64: Always start with clearing SVE flag on load
Note: The patch differs from the upstream commit:
---
1: 8383741ab2e77 ! 1: e6a9fd27335d3 KVM: arm64: Get rid of host SVE tracking/saving
@@ Metadata
## Commit message ##
KVM: arm64: Get rid of host SVE tracking/saving
+ [ Upstream commit 8383741ab2e773a992f1f0f8acdca5e7a4687c49 ]
+
The SVE host tracking in KVM is pretty involved. It relies on a
set of flags tracking the ownership of the SVE register, as well
as that of the EL0 access.
@@ Commit message
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
+ Signed-off-by: Mark Brown <broonie@kernel.org>
## arch/arm64/include/asm/kvm_host.h ##
@@ arch/arm64/include/asm/kvm_host.h: struct kvm_vcpu_arch {
@@ arch/arm64/kvm/fpsimd.c: void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
## arch/arm64/kvm/hyp/include/hyp/switch.h ##
@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static inline bool __populate_fault_info(struct kvm_vcpu *vcpu)
- return __get_fault_info(vcpu->arch.fault.esr_el2, &vcpu->arch.fault);
+ return __get_fault_info(esr, &vcpu->arch.fault);
}
-static inline void __hyp_sve_save_host(struct kvm_vcpu *vcpu)
@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static inline bool __populate_fault_inf
{
sve_cond_update_zcr_vq(vcpu_sve_max_vq(vcpu) - 1, SYS_ZCR_EL2);
@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static inline void __hyp_sve_restore_guest(struct kvm_vcpu *vcpu)
- */
- static bool kvm_hyp_handle_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code)
+ /* Check for an FPSIMD/SVE trap and handle as appropriate */
+ static inline bool __hyp_handle_fpsimd(struct kvm_vcpu *vcpu)
{
- bool sve_guest, sve_host;
+ bool sve_guest;
@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static inline void __hyp_sve_restore_gu
-
+ sve_guest = vcpu_has_sve(vcpu);
esr_ec = kvm_vcpu_trap_get_class(vcpu);
-
- /* Don't handle SVE traps for non-SVE vcpus here: */
-@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static bool kvm_hyp_handle_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code)
+ if (esr_ec != ESR_ELx_EC_FP_ASIMD &&
+ esr_ec != ESR_ELx_EC_SVE)
+@@ arch/arm64/kvm/hyp/include/hyp/switch.h: static inline bool __hyp_handle_fpsimd(struct kvm_vcpu *vcpu)
isb();
if (vcpu->arch.flags & KVM_ARM64_FP_HOST) {
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y | Success | Success |
next prev parent reply other threads:[~2025-04-10 15:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 18:09 [PATCH 5.15 v3 00/11] KVM: arm64: Backport of SVE fixes to v5.15 Mark Brown
2025-04-08 18:09 ` [PATCH 5.15 v3 01/11] KVM: arm64: Get rid of host SVE tracking/saving Mark Brown
2025-04-10 15:54 ` Sasha Levin [this message]
2025-04-08 18:09 ` [PATCH 5.15 v3 02/11] KVM: arm64: Always start with clearing SVE flag on load Mark Brown
2025-04-10 15:53 ` Sasha Levin
2025-04-10 16:11 ` Mark Brown
2025-04-10 16:43 ` Sasha Levin
2025-04-10 16:46 ` Mark Brown
2025-04-08 18:09 ` [PATCH 5.15 v3 03/11] KVM: arm64: Discard any SVE state when entering KVM guests Mark Brown
2025-04-08 18:09 ` [PATCH 5.15 v3 04/11] arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 05/11] arm64/fpsimd: Have KVM explicitly say which FP registers to save Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 06/11] arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 07/11] KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 08/11] KVM: arm64: Remove host FPSIMD saving for non-protected KVM Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 09/11] KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 10/11] KVM: arm64: Calculate cptr_el2 traps on activating traps Mark Brown
2025-04-08 18:10 ` [PATCH 5.15 v3 11/11] KVM: arm64: Eagerly switch ZCR_EL{1,2} Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250410112209-863d60ce97fc4e9f@stable.kernel.org \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).