[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200622183657.GH20421@lakka.kapsi.fi>
Date: Mon, 22 Jun 2020 21:36:57 +0300
From: Petteri Aimonen <jpa@...nelbug.mail.kapsi.fi>
To: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>,
Dave Hansen <dave.hansen@...el.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/fpu: Reset MXCSR to default in kernel_fpu_begin()
> We want to make sure that GCC puts things in the right order. I
> suppose that even a memory clobber is insufficient here, though.
amdgpu worked around that by using a noinline function:
https://github.com/torvalds/linux/commit/59dfb0c64d3853d20dc84f4561f28d4f5a2ddc7d#diff-a82b8ab0e6b4f9abfd3344d1427d765f
If there is something that would help, it would have to be an
attribute added to kernel_fpu_begin() in the header. Any barriers
inside the function will be invisible to code generation in other
compilation units.
--
Petteri
Powered by blists - more mailing lists