[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wi=otQxzhLAofWEvULLMk2X3G3zcWfUWz7e1CFz+xYs2Q@mail.gmail.com>
Date: Tue, 28 Jan 2020 12:06:53 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...nel.org>, Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...e.de>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] x86/asm changes for v5.6
On Tue, Jan 28, 2020 at 11:51 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> ALTERNATIVE_2 \
> "cmp $680, %rdx ; jb 3f ; cmpb %dil, %sil; je 4f", \
> "movq %rdx, %rcx ; rep movsb; retq", X86_FEATURE_FSRM, \
> "cmp $0x20, %rdx; jb 1f; movq %rdx, %rcx; rep movsb; retq", X86_FEATURE_ERMS
Note the UNTESTED part.
In particular, I didn't check what the priority for the alternatives
is. Since FSRM being set always implies ERMS being set too, it may be
that the ERMS case is always picked with the above code.
So maybe the FSRM and ERMS lines need to be switched around, and
somebody should add a comment to the ALTERNATIVE_2 macro about the
priority rules for feature1 vs feature2 when both are set..
IOW, testing most definitely required for that patch suggestion of mine..
Linus
Powered by blists - more mailing lists