x86/msr: Consolidate native/paravirt MSR functions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 12 repliesIn review
- v18 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Remove "raw_" names. Just use "paravirt_" in the generic code.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | x86/msr: Use paravirt "calls" in common codearch/ | +14 | 1 reply | |
| 2/8 | x86/msr: Consolidate rdmsr() definitionsarch/ arch/ | +10 | 4 replies | |
| 3/8 | x86/msr: Consolidate rdmsr_safe() implementationsarch/ arch/ | +10 | 1 reply | |
| 4/8 | x86/msr: Consolidate rdmsrq() implementationsarch/ arch/ | +3 | 0 replies | |
| 5/8 | x86/msr: Consolidate {rd,wr}msr[q]_safe() implementationsarch/ arch/ | +21 | 0 replies | |
| 6/8 | x86/msr: Consolidate rdpmc() implementationsarch/ arch/ | +7 | 1 reply | |
| 7/8 | x86/msr: Remove old crusty commentarch/ | +0 | 0 replies | |
| 8/8 | x86/msr: Remove duplicate #includearch/ | +0 | 3 replies |
Reviews trailers per patch
1 of 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Juergen Gross | Maciej Wieczor-Retman |
|---|---|---|
| Series | R-b | |
| 1/8 | ||
| 2/8 | ||
| 3/8 | T-b A-b | |
| 4/8 | ||
| 5/8 | ||
| 6/8 | ||
| 7/8 | ||
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/8] x86/msr: Consolidate native/paravirt MSR functions
Changes from v1:
- Remove "raw_" names. Just use "paravirt_" in the generic code.
I'm thinking I'll just apply this in the coming days if nobody screams too loudly.
--
This is old cruft, but it appears that having two copies of these MSR functions is enabling warnings to creep in[1].
I know there's also been some work to pare down the XXL code, but it's obviously not merged yet and this is a good baby step.
Create helpers that both paravirt and native can use in common code and remove the paravirt implementations of the helpers. This reduces the amount of logic that is duplicated in the paravirt code.
The wonky thing about this solution is that it has the common code always make literal "paravirt_" calls, even when paravirt is not in use for MSRs. In that case, the calls just go directly to the "native_" functions via #defines.
Conceptually:
- native: The bare-metal implementation. Might not be usable under
paravirt XXL.
- paravirt: Call the native version directly if paravirt is compiled out. Call into paravirt ops when available, which might ultimately call a native implementation.
1. https://lore.kernel.org/all/[email protected]/
msr.h | 124 +++++++++++++++++++++++++++++++------------------------------ paravirt.h | 44 --------------------- 2 files changed, 65 insertions(+), 103 deletions(-)