All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2 02/10] KVM: arm64: Discard any SVE state when entering KVM guests
Date: Thu,  3 Apr 2025 11:39:22 -0400	[thread overview]
Message-ID: <20250403085850-45573ddb54f00a4f@stable.kernel.org> (raw)
In-Reply-To: <20250403-stable-sve-5-15-v2-2-30a36a78a20a@kernel.org>

[ Sasha's backport helper bot ]

Hi,

Summary of potential issues:
ℹ️ This is part 02/10 of a series
⚠️ Found follow-up fixes in mainline

The upstream commit SHA1 provided is correct: 93ae6b01bafee8fa385aa25ee7ebdb40057f6abe

Status in newer kernel trees:
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (exact SHA1)
6.1.y | Not found

Found fixes commits:
fbc7e61195e2 KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state

Note: The patch differs from the upstream commit:
---
1:  93ae6b01bafee ! 1:  710abf6eb6613 KVM: arm64: Discard any SVE state when entering KVM guests
    @@ Metadata
      ## Commit message ##
         KVM: arm64: Discard any SVE state when entering KVM guests
     
    +    [ Upstream commit 93ae6b01bafee8fa385aa25ee7ebdb40057f6abe ]
    +
         Since 8383741ab2e773a99 (KVM: arm64: Get rid of host SVE tracking/saving)
         KVM has not tracked the host SVE state, relying on the fact that we
         currently disable SVE whenever we perform a syscall. This may not be true
    @@ Commit message
         Reviewed-by: Marc Zyngier <maz@kernel.org>
         Link: https://lore.kernel.org/r/20221115094640.112848-2-broonie@kernel.org
         Signed-off-by: Will Deacon <will@kernel.org>
    +    [ Mark: trivial backport to v6.1 ]
    +    Signed-off-by: Mark Rutland <mark.rutland@arm.com>
    +    Signed-off-by: Mark Brown <broonie@kernel.org>
     
      ## arch/arm64/include/asm/fpsimd.h ##
     @@ arch/arm64/include/asm/fpsimd.h: extern void fpsimd_signal_preserve_current_state(void);
    @@ arch/arm64/include/asm/fpsimd.h: extern void fpsimd_signal_preserve_current_stat
     +extern void fpsimd_kvm_prepare(void);
      
      extern void fpsimd_bind_state_to_cpu(struct user_fpsimd_state *state,
    - 				     void *sve_state, unsigned int sve_vl,
    + 				     void *sve_state, unsigned int sve_vl);
     
      ## arch/arm64/kernel/fpsimd.c ##
     @@ arch/arm64/kernel/fpsimd.c: void fpsimd_signal_preserve_current_state(void)
    @@ arch/arm64/kvm/fpsimd.c: int kvm_arch_vcpu_run_map_fp(struct kvm_vcpu *vcpu)
      	BUG_ON(!current->mm);
     -	BUG_ON(test_thread_flag(TIF_SVE));
      
    - 	if (!system_supports_fpsimd())
    - 		return;
    + 	vcpu->arch.flags &= ~KVM_ARM64_FP_ENABLED;
    + 	vcpu->arch.flags |= KVM_ARM64_FP_HOST;
      
     +	fpsimd_kvm_prepare();
     +
    - 	vcpu->arch.fp_state = FP_STATE_HOST_OWNED;
    - 
    - 	vcpu_clear_flag(vcpu, HOST_SVE_ENABLED);
    ++	vcpu->arch.flags &= ~KVM_ARM64_HOST_SVE_ENABLED;
    ++
    + 	if (read_sysreg(cpacr_el1) & CPACR_EL1_ZEN_EL0EN)
    + 		vcpu->arch.flags |= KVM_ARM64_HOST_SVE_ENABLED;
    + }
---

NOTE: These results are for this patch alone. Full series testing will be
performed when all parts are received.

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

  reply	other threads:[~2025-04-03 15:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 23:20 [PATCH 5.15 v2 00/10] KVM: arm64: Backport of SVE fixes to v5.15 Mark Brown
2025-04-02 23:20 ` [PATCH 5.15 v2 01/10] KVM: arm64: Get rid of host SVE tracking/saving Mark Brown
2025-04-03 15:38   ` Sasha Levin
2025-04-03 16:04     ` Mark Brown
2025-04-03 16:10     ` Mark Brown
2025-04-02 23:20 ` [PATCH 5.15 v2 02/10] KVM: arm64: Discard any SVE state when entering KVM guests Mark Brown
2025-04-03 15:39   ` Sasha Levin [this message]
2025-04-03 16:27     ` Mark Brown
2025-04-02 23:20 ` [PATCH 5.15 v2 03/10] arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE Mark Brown
2025-04-03 15:38   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 04/10] arm64/fpsimd: Have KVM explicitly say which FP registers to save Mark Brown
2025-04-03 15:39   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 05/10] arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM Mark Brown
2025-04-03 15:38   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 06/10] KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state Mark Brown
2025-04-03 15:39   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 07/10] KVM: arm64: Remove host FPSIMD saving for non-protected KVM Mark Brown
2025-04-03 15:39   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 08/10] KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN Mark Brown
2025-04-03 15:38   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 09/10] KVM: arm64: Calculate cptr_el2 traps on activating traps Mark Brown
2025-04-03 15:38   ` Sasha Levin
2025-04-02 23:20 ` [PATCH 5.15 v2 10/10] KVM: arm64: Eagerly switch ZCR_EL{1,2} Mark Brown
2025-04-03 15:39   ` Sasha Levin

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=20250403085850-45573ddb54f00a4f@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.