[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4YXYSFN+0KnmU0G0gx0rHrGKR_X58ZOhUVbWDd9cTJfuQ@mail.gmail.com>
Date: Sat, 15 Mar 2025 10:52:25 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>, Andrew Cooper <andrew.cooper3@...rix.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 00/20] x86: Cleanup alternative_io() and friends, prep for asm_call()
On Fri, Mar 14, 2025 at 11:25 PM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> On Fri, Mar 14, 2025 at 02:41:13PM -0700, Josh Poimboeuf wrote:
> > Make the alternative_io() interface more straightforward and flexible,
> > and get rid of alternative_input().
> >
> > These patches are a prereq for another set[1] which will get rid of
> > ASM_CALL_CONSTRAINT[2] in favor of a much more flexible asm_call()
> > interface similar to the new alternative_io().
> >
> > [1] Additional 20+ patches not posted yet to avoid flooding inboxes
>
> The rest of the patches are here if anybody wants to see where this is
> going:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git asm-call
FYI, you missed one conversion of asm involving ALTERNATIVE in
arch/x86/include/asm/nospec-branch.h:
void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature)
{
asm volatile(ALTERNATIVE("", "wrmsr", %c[feature])
: : "c" (msr),
"a" ((u32)val),
"d" ((u32)(val >> 32)),
[feature] "i" (feature)
: "memory");
Uros.
Powered by blists - more mailing lists