[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 02/15] x86/msr: Replace __rdmsr() with native_rdmsrl()
- To: "Xin Li (Intel)" <xin@xxxxxxxxx>
- From: Ingo Molnar <mingo@xxxxxxxxxx>
- Date: Mon, 31 Mar 2025 12:26:21 +0200
- Cc: 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, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, 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: Mon, 31 Mar 2025 10:26:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
* Xin Li (Intel) <xin@xxxxxxxxx> wrote:
> __rdmsr() is the lowest level primitive MSR read API, and its direct
> use is NOT preferred. Use its wrapper function native_rdmsrl()
> instead.
This description is very misleading. As of today, native_rdmsrl()
doesn't exist in-tree, so it cannot be 'preferred' in any fashion.
We have native_read_msr(), a confusingly similar function name, and
this changelog doesn't make it clear, at all, why the extra
native_rdmsrl() indirection is introduced.
Please split this into two changes and explain them properly:
- x86/msr: Add the native_rdmsrl() helper
- x86/msr: Convert __rdmsr() uses to native_rdmsrl() uses
For the first patch you should explain why you want an extra layer of
indirection within these APIs and how it relates to native_read_msr()
and why there is a _read_msr() and a _rdmsr() variant...
Thanks,
Ingo
|