From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <x86@kernel.org>,
<tglx@kernel.org>, <mingo@redhat.com>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <hpa@zytor.com>,
Omar Avelar <omar.avelar@intel.com>, <stable@vger.kernel.org>,
Miguel Ojeda <ojeda@kernel.org>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH] x86/build/64: Prevent native builds from generating APX instructions
Date: Sun, 2 Aug 2026 14:32:32 -0700 [thread overview]
Message-ID: <762ba2f6-bfe1-461d-a46d-84f5f368445b@intel.com> (raw)
In-Reply-To: <20260802100808.754400af@pumpkin>
On 8/2/2026 2:08 AM, David Laight wrote:
>
> Does that mean that this patch is completely unnecessary?
It is necessary. On APX systems running, e.g. Linux kernel v6.16+, with
the OS enables XCR0.APX, the compiler may consider all 32 registers
usable and the compiled kernel inadvertently emits APX instructions
(unconditionally) clobbering those registers. So -mno apxf prevents such
unintended in-kernel use.
Note that mainline currently supports only userspace APX, where user
EGPR state is context-switched through the XSAVE mechanism. That alone
is insufficient to support in-kernel uses. Like the legacy GPRs, EGPRs
need to be handled on entry paths, and there are still many other things
to consider before in-kernel usages.
Thanks,
Chang
prev parent reply other threads:[~2026-08-02 21:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 21:14 [PATCH] x86/build/64: Prevent native builds from generating APX instructions Chang S. Bae
2026-07-09 12:36 ` Miguel Ojeda
2026-07-14 22:15 ` Chang S. Bae
2026-07-15 10:30 ` Miguel Ojeda
2026-07-31 20:46 ` Chang S. Bae
2026-07-31 20:57 ` Miguel Ojeda
2026-07-31 21:15 ` Chang S. Bae
2026-07-12 20:25 ` Nathan Chancellor
2026-08-01 11:44 ` David Laight
2026-08-02 0:00 ` Chang S. Bae
2026-08-02 9:08 ` David Laight
2026-08-02 21:32 ` Chang S. Bae [this message]
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=762ba2f6-bfe1-461d-a46d-84f5f368445b@intel.com \
--to=chang.seok.bae@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david.laight.linux@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ojeda@kernel.org \
--cc=omar.avelar@intel.com \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox