[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250228010605.tjgho3cfr5oawdqd@desk>
Date: Thu, 27 Feb 2025 17:06:05 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: x86@...nel.org, Josh Poimboeuf <jpoimboe@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/speculation: Simplify and make CALL_NOSPEC consistent
On Fri, Feb 28, 2025 at 12:36:40AM +0000, Andrew Cooper wrote:
> > Getting rid of one layer of macro makes it less magical:
> >
> > #define __CS_PREFIX(reg) \
> > ".irp rs,r8,r9,r10,r11,r12,r13,r14,r15\n" \
> > ".ifc \\rs," reg "\n" \
> > ".byte 0x2e\n" \
> > ".endif\n" \
> > ".endr\n"
> >
> > #define CALL_NOSPEC __CS_PREFIX("%V[thunk_target]") \
> > "call __x86_indirect_thunk_%V[thunk_target]\n"
> > #else
> > #define CALL_NOSPEC "call *%[thunk_target]\n"
> > #endif
[...]
> Yeah, I think that's a lot better.
Ok, I will go with this approach for now.
Powered by blists - more mailing lists