Re: [PATCH v2 09/12] x86/msr: Use the alternatives mechanism for WRMSR
From: H. Peter Anvin
Date: Fri Oct 03 2025 - 12:55:26 EST
On October 3, 2025 7:23:29 AM PDT, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>On 10/1/25 00:23, Peter Zijlstra wrote:
>> On Wed, Oct 01, 2025 at 08:43:39AM +0200, Peter Zijlstra wrote:
>>> Let me see how terrible it all ends up when using as macros
>> Argh, as macros are differently painful. I hate computers :/
>
>ALTERNATIVES are fun and all, but is there a good reason we're pulling
>out our hair to use them here?
>
>Normal WRMSR is slooooooooooow. The ones that aren't slow don't need
>WRMSRNS in the first place.
>
>Would an out-of-line wrmsr() with an if() in it be so bad? Or a
>static_call()? Having WRMSR be inlined in a laudable goal, but I'm
>really asking if it's worth it.
We need them to use wrmsrns immediate.