From: Nathan Chancellor <nathan@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [PATCH] x86/build: Do not allow X86_NATIVE_CPU to be enabled on non-x86_64 hosts
Date: Sat, 14 Nov 2026 22:07:30 -0700 [thread overview]
Message-ID: <20261115050730.GB600738@ax162> (raw)
In-Reply-To: <20261114205806.GCavjLXgsKNNwK0zLz@fat_crate.local>
On Sat, Nov 14, 2026 at 12:58:06PM -0800, Borislav Petkov wrote:
> On Sat, Nov 14, 2026 at 01:46:05PM -0700, Nathan Chancellor wrote:
> > No other architectures provide an option to turn on '-march=native' like
> > x86 does. It all lives within arch/x86, so I would just be adding a
> > check to arch/x86/Makefile instead of arch/x86/Kconfig.cpu. Making the
> > option unselectable seems like a better option. If other architectures
> > did want to add this option, I agree generically abstacting this check
> > would be reasonable.
>
> Are you going to move it somewhere generic when other arches decide all of
> a sudden they love the native thing?
Yes, as I would expect another architecture implementing this to
abstract the current x86 support out and adjust that check in the
process but I can't guarantee that. I can only go off of what is
currently in the tree.
> (If it were me, I'd simply whack that native thing. It is such a waste of
> energy).
Another option short of adding this test or killing it entirely would be
depending on !COMPILE_TEST, as I only noticed this because
CONFIG_X86_NATIVE_CPU gets enabled for allmodconfig.
--
Cheers,
Nathan
prev parent reply other threads:[~2026-11-15 5:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 0:31 [PATCH] x86/build: Do not allow X86_NATIVE_CPU to be enabled on non-x86_64 hosts Nathan Chancellor
2026-11-14 20:25 ` Borislav Petkov
2026-11-14 20:46 ` Nathan Chancellor
2026-11-14 20:58 ` Borislav Petkov
2026-11-15 5:07 ` Nathan Chancellor [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=20261115050730.GB600738@ax162 \
--to=nathan@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=ndesaulniers@google.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