Re: [RFC PATCH v1 01/15] x86/msr: Replace __wrmsr() with native_wrmsrl()

From: Xin Li
Date: Thu Apr 03 2025 - 03:14:52 EST


On 3/31/2025 2:45 PM, Andrew Cooper wrote:
On 31/03/2025 9:22 am, Xin Li (Intel) wrote:
__wrmsr() is the lowest level primitive MSR write API, and its direct
use is NOT preferred. Use its wrapper function native_wrmsrl() instead.

No functional change intended.

Signed-off-by: Xin Li (Intel) <xin@xxxxxxxxx>

The critical piece of information you're missing from the commit message
is that the MSR_IMM instructions take a single u64.

Therefore to use them, you've got to arrange for all callers to provide
a single u64, rather than a split u32 pair.

You definitely caught me on how I was thinking it ;)

Sometimes it is nice to see a change log with a thinking process.

Thanks!
Xin