On 3/31/2025 10:13 PM, H. Peter Anvin wrote:
On March 31, 2025 2:45:43 PM PDT, Andrew Cooper <andrew.coop...@citrix.com>
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) <x...@zytor.com>
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.
~Andrew
That being said, there is nothing wrong with having a two-word convenience
wrapper.
Yes, I ended up keeping the two-word convenience wrapper in this patch
set, and the wrapper calls a lower level API that takes a u64 argument.
And yes, as Ingo said, some of the conversion is NOT an improvement.