From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: xenomai@xenomai.org
Subject: Re: [dovetail 6.1.y-cip][PATCH 1/3] arm64: fpsimd: dovetail: Hard-disable interrupts inside fpsimd_save_and_flush_cpu_state
Date: Tue, 23 Sep 2025 20:51:21 +0200 [thread overview]
Message-ID: <87bjn1m28m.fsf@xenomai.org> (raw)
In-Reply-To: <b9ecf3458a5c8850edc16b46a8ef67152bd0d197.1758264904.git.jan.kiszka@siemens.com> (Jan Kiszka's message of "Fri, 19 Sep 2025 08:55:02 +0200")
Jan Kiszka <jan.kiszka@siemens.com> writes:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Not all callers of this function do that themselves.
>
Are we 100% sure that kvm_arch_vcpu_load_fp() and kvm_arch_vcpu_put_fp()
would not benefit from doing that themselves precisely, to create an
atomic section around their internal state change _and_ the fpsimd flush
op?
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> arch/arm64/kernel/fpsimd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
> index 83b8492984982..ba804fcdfdb3f 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -1951,10 +1951,10 @@ void fpsimd_save_and_flush_cpu_state(void)
> if (!system_supports_fpsimd())
> return;
> WARN_ON(!hard_irqs_disabled() && preemptible());
> - __get_cpu_fpsimd_context();
> + get_cpu_fpsimd_context();
> __fpsimd_save();
> fpsimd_flush_cpu_state();
> - __put_cpu_fpsimd_context();
> + put_cpu_fpsimd_context();
> }
>
> #ifdef CONFIG_KERNEL_MODE_NEON
--
Philippe.
next prev parent reply other threads:[~2025-09-23 18:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 6:55 [dovetail 6.1.y-cip][PATCH 0/3] fpsimd fixes and cleanups Jan Kiszka
2025-09-19 6:55 ` [dovetail 6.1.y-cip][PATCH 1/3] arm64: fpsimd: dovetail: Hard-disable interrupts inside fpsimd_save_and_flush_cpu_state Jan Kiszka
2025-09-19 7:18 ` Jan Kiszka
2025-09-19 9:20 ` Jan Kiszka
2025-09-23 18:51 ` Philippe Gerum [this message]
2025-09-25 12:40 ` Jan Kiszka
2025-09-25 12:47 ` Florian Bezdeka
2025-09-25 12:49 ` Jan Kiszka
2025-09-25 12:57 ` Florian Bezdeka
2025-09-25 13:00 ` Jan Kiszka
2025-09-25 13:03 ` Florian Bezdeka
2025-09-25 13:05 ` Jan Kiszka
2025-09-27 17:53 ` Philippe Gerum
2025-09-27 18:54 ` Florian Bezdeka
2025-10-08 13:35 ` Bezdeka, Florian
2025-11-18 10:55 ` Florian Bezdeka
2025-11-18 12:29 ` Jan Kiszka
2025-09-19 6:55 ` [dovetail 6.1.y-cip][PATCH 2/3] arm64: fpsimd: dovetail: drop redundant hard irqs disabling Jan Kiszka
2025-10-27 16:01 ` Jan Kiszka
2025-10-27 16:07 ` Philippe Gerum
2025-09-19 6:55 ` [dovetail 6.1.y-cip][PATCH 3/3] arm64: fpsimd: dovetail: Drop extra condition from WARN_ON Jan Kiszka
2025-09-23 18:52 ` Philippe Gerum
2025-09-23 19:02 ` Philippe Gerum
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=87bjn1m28m.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=jan.kiszka@siemens.com \
--cc=xenomai@xenomai.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.