The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hanabishi <i.r.e.c.c.a.k.u.n+kernel.org@gmail.com>
To: Borislav Petkov <bp@alien8.de>, John <therealgraysky@proton.me>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Unknown <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: add more x86-64 micro-architecture levels
Date: Tue, 17 Sep 2024 21:33:36 +0000	[thread overview]
Message-ID: <90d5a756-e534-490b-b451-7c855183ebc3@gmail.com> (raw)
In-Reply-To: <20240915124944.GAZubX6LAcjQjN-yEb@fat_crate.local>

On 9/15/24 12:49, Borislav Petkov wrote:
> Patches like this one appear off and on on the mailing list and each
> time I ask what's the upside of maintaining this complexity?

Besides, there are already well-known patches exist for years. So why reinventing the wheel here?

E.g. graysky patch used by ZEN kernel:
https://github.com/zen-kernel/zen-kernel/commit/6f32b8af8ccdb56ef2856db3631eea55b79378c6
It contains way more architectures, includig ISA levels.

On 9/15/24 11:05, John wrote:
> GCC 11.1 and Clang 12.0[1] allow for the following new generic
> 64-bit levels: x86-64-v2, x86-64-v3, and x86-64-v4.  This commit
> adds them as options accessible under:
>   Processor type and features  --->
>    Processor family --->

Anyway, this whole thing is actually more complicated than simply setting '-march'.
Vector instructions are known to be problematic for the kernel, so they are disabled by KBUILD_CFLAGS.
If you want to go with higher ISA levels than the kernel expects, an additional patch like this is required:
https://github.com/zen-kernel/zen-kernel/commit/addc601c58e035e28153deeb6d441b91f1a50247


  parent reply	other threads:[~2024-09-17 21:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15 11:05 [PATCH] x86: add more x86-64 micro-architecture levels John
2024-09-15 11:40 ` Dave Hansen
2024-09-15 12:25   ` John
2024-09-15 12:58     ` Dave Hansen
2024-09-15 18:42   ` John
2024-09-17 18:22     ` John
2024-09-17 18:45       ` H. Peter Anvin
2024-09-15 12:49 ` Borislav Petkov
2024-09-15 12:53   ` Dave Hansen
2024-09-17 21:33   ` Hanabishi [this message]
2024-09-18 19:02     ` John
2024-09-18 20:25       ` Hanabishi
2024-09-18 21:14         ` John
2024-09-18 21:48           ` Hanabishi
2024-09-18 23:07             ` John
2024-09-16  5:14 ` WangYuli
2024-09-24  7:00 ` kernel test robot
2024-09-24 13:38   ` Dave Hansen
2024-09-24 17:40   ` John
2024-09-26  1:43     ` Oliver Sang

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=90d5a756-e534-490b-b451-7c855183ebc3@gmail.com \
    --to=i.r.e.c.c.a.k.u.n+kernel.org@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=therealgraysky@proton.me \
    --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