All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, broonie@kernel.org,
	catalin.marinas@arm.com, eauger@redhat.com,
	eric.auger@redhat.com, fweimer@redhat.com, jeremy.linton@arm.com,
	maz@kernel.org, pbonzini@redhat.com, stable@vger.kernel.org,
	tabba@google.com, wilco.dijkstra@arm.com, will@kernel.org
Subject: Re: [PATCH v3 0/8] KVM: arm64: FPSIMD/SVE/SME fixes
Date: Mon, 10 Feb 2025 14:51:14 -0800	[thread overview]
Message-ID: <Z6qC4qn47ONfDCSH@linux.dev> (raw)
In-Reply-To: <20250210195226.1215254-1-mark.rutland@arm.com>

On Mon, Feb 10, 2025 at 07:52:18PM +0000, Mark Rutland wrote:
> These patches fix some issues with the way KVM manages FPSIMD/SVE/SME
> state. The series supersedes my earlier attempt at fixing the host SVE
> state corruption issue:
> 
>   https://lore.kernel.org/linux-arm-kernel/20250121100026.3974971-1-mark.rutland@arm.com/
> 
> Patch 1 addresses the host SVE state corruption issue by always saving
> and unbinding the host state when loading a vCPU, as discussed on the
> earlier patch:
> 
>   https://lore.kernel.org/linux-arm-kernel/Z4--YuG5SWrP_pW7@J2N7QTR9R3/
>   https://lore.kernel.org/linux-arm-kernel/86plkful48.wl-maz@kernel.org/
> 
> Patches 2 to 4 remove code made redundant by patch 1. These probably
> warrant backporting along with patch 1 as there is some historical
> brokenness in the code they remove.
> 
> Patches 5 to 7 are preparatory refactoring for patch 8, and are not
> intended to have any functional impact.
> 
> Patch 8 addresses some mismanagement of ZCR_EL{1,2} which can result in
> the host VMM unexpectedly receiving a SIGKILL. To fix this, we eagerly
> switch ZCR_EL{1,2} at guest<->host transitions, as discussed on another
> series:
> 
>   https://lore.kernel.org/linux-arm-kernel/Z4pAMaEYvdLpmbg2@J2N7QTR9R3/
>   https://lore.kernel.org/linux-arm-kernel/86o6zzukwr.wl-maz@kernel.org/
>   https://lore.kernel.org/linux-arm-kernel/Z5Dc-WMu2azhTuMn@J2N7QTR9R3/
> 
> The end result is that KVM loses ~100 lines of code, and becomes a bit
> simpler to reason about.

LGTM, although a minor nitpick would be to repack the host data flags at
the end of purging SVE/SME.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>

-- 
Thanks,
Oliver


  parent reply	other threads:[~2025-02-10 23:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 19:52 [PATCH v3 0/8] KVM: arm64: FPSIMD/SVE/SME fixes Mark Rutland
2025-02-10 19:52 ` [PATCH v3 1/8] KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state Mark Rutland
2025-02-10 19:52 ` [PATCH v3 2/8] KVM: arm64: Remove host FPSIMD saving for non-protected KVM Mark Rutland
2025-02-10 19:52 ` [PATCH v3 3/8] KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN Mark Rutland
2025-02-10 19:52 ` [PATCH v3 4/8] KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN Mark Rutland
2025-02-10 19:52 ` [PATCH v3 5/8] KVM: arm64: Refactor CPTR trap deactivation Mark Rutland
2025-02-10 19:52 ` [PATCH v3 6/8] KVM: arm64: Refactor exit handlers Mark Rutland
2025-02-10 19:52 ` [PATCH v3 7/8] KVM: arm64: Mark some header functions as inline Mark Rutland
2025-02-10 19:52 ` [PATCH v3 8/8] KVM: arm64: Eagerly switch ZCR_EL{1,2} Mark Rutland
2025-02-11 10:36   ` Will Deacon
2025-02-10 22:51 ` Oliver Upton [this message]
2025-02-11 10:54 ` [PATCH v3 0/8] KVM: arm64: FPSIMD/SVE/SME fixes Marc Zyngier

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=Z6qC4qn47ONfDCSH@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=eauger@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=jeremy.linton@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tabba@google.com \
    --cc=wilco.dijkstra@arm.com \
    --cc=will@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.