[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <861e2ac3-b56b-4879-9a78-e20bac4906f1@www.fastmail.com>
Date: Mon, 24 May 2021 20:44:36 -0700
From: "Andy Lutomirski" <luto@...nel.org>
To: "Len Brown" <lenb@...nel.org>
Cc: "Bae, Chang Seok" <chang.seok.bae@...el.com>,
"Borislav Petkov" <bp@...e.de>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Ingo Molnar" <mingo@...nel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
"Brown, Len" <len.brown@...el.com>,
"Dave Hansen" <dave.hansen@...el.com>,
"Liu, Jing2" <jing2.liu@...el.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 21/28] x86/fpu/amx: Initialize child's AMX state
On Mon, May 24, 2021, at 11:21 AM, Len Brown wrote:
> On Mon, May 24, 2021 at 2:14 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> > What does VOLATILE mean in this context?
>
> Volatile means caller-saved.
Just like every other extended math register except some XMMs on Windows. (Thanks you so, so much, Microsoft, for screwing this up, and thank you Intel for indulging Microsoft.)
>
> Volatile registers can not be used for globals, static, or for
> parameter passing.
>
> ie. By the time the callee is running, they must be assumed to be invalid.
Callees can’t assume anything about any of the registers unless explicitly specified. TILE is no different from RBP or XMM in this regard.
>
> This means that any routine, including the target of a system call,
> such as fork/clone, can't assume that any data exists in these
> registers.
>
If we actually believe this, then we should clear xmm, ymm, zmm, etc on every system call. Barring that, let’s come up with reasonable semantics, document it, and implement it.
Powered by blists - more mailing lists