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/[email protected]/

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

Reply via email to