[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250430225442.7b3b471f@pumpkin>
Date: Wed, 30 Apr 2025 22:54:42 +0100
From: David Laight <david.laight.linux@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>, Arnd
Bergmann <arnd@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo
Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
<dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin"
<hpa@...or.com>, Juergen Gross <jgross@...e.com>, Boris Ostrovsky
<boris.ostrovsky@...cle.com>, Alexander Usyskin
<alexander.usyskin@...el.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Mateusz Jończyk
<mat.jonczyk@...pl>, Mike Rapoport <rppt@...nel.org>, Ard Biesheuvel
<ardb@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] [RFC] x86/cpu: rework instruction set selection
On Sat, 26 Apr 2025 12:24:37 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Sat, 26 Apr 2025 at 11:59, Arnd Bergmann <arnd@...db.de> wrote:
> >
> > Right. With the current set of features, CMOV is almost the
> > same as 686. My reasoning was that support for CMOV has a
> > very clear definition, with the instruction either being
> > available or not.
>
> Yeah, I don't think there's any reason to make CMOV a reason to drop support.
>
> It has questionable performance impact - I doubt anybody can measure
> it - and the "maintenance burden" is basically a single compiler flag.
There is also the user/kernel address check for copy_to/from_user (etc).
The 'cmov' version used for 64bit is nice and succinct (as well as being
speculative execution safe).
Unlike the 'sbb' version it doesn't rely on the first access being to
the first address of the buffer (or page 0 not being mapped).
But I'd guess that the kernel ought to have a boot time test for some
of these instructions - so at least it fails gracefully.
Which would required compiling some early code without cmov.
David
Powered by blists - more mailing lists