[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 01/15] x86/msr: Replace __wrmsr() with native_wrmsrl()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Xin Li (Intel)" <xin@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Mon, 31 Mar 2025 22:13:51 -0700
- Cc: tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, jgross@xxxxxxxx, peterz@xxxxxxxxxxxxx, acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx, irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx, kan.liang@xxxxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, ajay.kaher@xxxxxxxxxxxx, alexey.amakhalov@xxxxxxxxxxxx, bcm-kernel-feedback-list@xxxxxxxxxxxx, tony.luck@xxxxxxxxx, pbonzini@xxxxxxxxxx, vkuznets@xxxxxxxxxx, seanjc@xxxxxxxxxx, luto@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, decui@xxxxxxxxxxxxx
- Delivery-date: Tue, 01 Apr 2025 05:14:54 +0000
- Dkim-filter: OpenDKIM Filter v2.11.0 mail.zytor.com 5315DrPW3571921
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On March 31, 2025 2:45:43 PM PDT, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
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.
>
>~Andrew
That being said, there is nothing wrong with having a two-word convenience
wrapper.
|