public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH 0/8] x86/msr: Consolidate native/paravirt MSR functions
@ 2026-03-20 19:03 Dave Hansen
  2026-03-20 19:03 ` [PATCH 1/8] x86/msr: Use "raw_" names for calls to native_* functions Dave Hansen
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Dave Hansen @ 2026-03-20 19:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86, Juergen Gross,
	virtualization, Dave Hansen

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 other thing I really like about this is that it puts the
raw=>{native,paravirt} switch in one compact place in the code.

Conceptually:
 -   native: The bare-metal implementation. Might not be usable under
	     paravirt XXL.
 -      raw: The lowest-level function that is always usable. Might
	     be native or paravirt under the hood.
 - paravirt: Always calls the paravirt code, but might end up
	     ultimately calling a native implementation version
	     through paravirt ops.

1. https://lore.kernel.org/all/20260319152210.210854-1-aldocontelk@gmail.com/

 msr.h      |  130 ++++++++++++++++++++++++++++++++-----------------------------
 paravirt.h |   44 --------------------
 2 files changed, 71 insertions(+), 103 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-23 15:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 19:03 [PATCH 0/8] x86/msr: Consolidate native/paravirt MSR functions Dave Hansen
2026-03-20 19:03 ` [PATCH 1/8] x86/msr: Use "raw_" names for calls to native_* functions Dave Hansen
2026-03-20 19:03 ` [PATCH 2/8] x86/msr: Consolidate rdmsr() definitions Dave Hansen
2026-03-20 19:03 ` [PATCH 3/8] x86/msr: Consolidate rdmsr_safe() implementations Dave Hansen
2026-03-20 19:03 ` [PATCH 4/8] x86/msr: Consolidate rdmsrq() implementations Dave Hansen
2026-03-20 19:03 ` [PATCH 5/8] x86/msr: Consolidate {rd,wr}msr[q]_safe() implementations Dave Hansen
2026-03-20 19:03 ` [PATCH 6/8] x86/msr: Consolidate rdpmc() implementations Dave Hansen
2026-03-20 19:03 ` [PATCH 7/8] x86/msr: Remove old crusty comment Dave Hansen
2026-03-20 19:03 ` [PATCH 8/8] x86/msr: Remove duplicate #include Dave Hansen
2026-03-20 23:33 ` [PATCH 0/8] x86/msr: Consolidate native/paravirt MSR functions Borislav Petkov
2026-03-20 23:39   ` Dave Hansen
2026-03-21  6:23   ` Jürgen Groß
2026-03-23 15:22     ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox