From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/4] arm64/sme: Don't flush SVE register state when allocating SME storage
Date: Wed, 17 Aug 2022 15:27:10 +0100 [thread overview]
Message-ID: <Yvz6vob0uQ3eRDB/@arm.com> (raw)
In-Reply-To: <20220815132834.229769-4-broonie@kernel.org>
On Mon, Aug 15, 2022 at 02:28:33PM +0100, Mark Brown wrote:
> Currently when taking a SME access trap we allocate storage for the SVE
> register state in order to be able to handle storage of streaming mode SVE.
> Due to the original usage in a purely SVE context the SVE register state
> allocation this also flushes the register state for SVE if storage was
> already allocated but in the SME context this is not desirable. For a SME
> access trap to be taken the task must not be in streaming mode so either
> there already is SVE register state present for regular SVE mode which would
> be corrupted or the task does not have TIF_SVE and the flush is redundant.
>
> Fix this by adding a flag to sve_alloc() indicating if we are in a SVE
> context and need to flush the state. Freshly allocated storage is always
> zeroed either way.
>
> Fixes: 8bd7f91c03d88 ("arm64/sme: Implement traps and syscall handling for SME")
> Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-17 14:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 13:28 [PATCH v2 0/4] arm64/sme: SME related fixes Mark Brown
2022-08-15 13:28 ` [PATCH v2 1/4] arm64/signal: Raise limit on stack frames Mark Brown
2022-08-17 14:04 ` Catalin Marinas
2022-08-17 15:24 ` Mark Brown
2022-08-15 13:28 ` [PATCH v2 2/4] arm64/signal: Flush FPSIMD register state when disabling streaming mode Mark Brown
2022-08-17 14:09 ` Catalin Marinas
2022-08-15 13:28 ` [PATCH v2 3/4] arm64/sme: Don't flush SVE register state when allocating SME storage Mark Brown
2022-08-17 14:27 ` Catalin Marinas [this message]
2022-08-15 13:28 ` [PATCH v2 4/4] arm64/sme: Don't flush SVE register state when handling SME traps Mark Brown
2022-08-17 14:28 ` Catalin Marinas
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=Yvz6vob0uQ3eRDB/@arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--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.