linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Split hyperv-tlfs.h into generic and arch specific files
@ 2020-04-20 17:38 Michael Kelley
  2020-04-20 17:38 ` [PATCH 1/4] KVM: x86: hyperv: Remove duplicate definitions of Reference TSC Page Michael Kelley
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Michael Kelley @ 2020-04-20 17:38 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, wei.liu, tglx, mingo, bp, x86, hpa,
	pbonzini, sean.j.christopherson, vkuznets, wanpengli, jmattson,
	joro, kvm, linux-kernel, linux-hyperv
  Cc: mikelley

This series splits hyperv-tlfs.h into architecture independent and
architecture specific files so that the arch independent portion can
be shared between the x86/x64 and ARM64 code for Hyper-V.  While the
Hyper-V team has not released a version of the TLFS document that
clearly specifies which portions of the interface are arch independent,
we can make a fairly good assessment based on implementation work done
to support Linux guests on Hyper-V on ARM64, and on private communication
with the Hyper-V team.  Definitions are considered arch independent if
they are implemented by Hyper-V on both architectures (x86/x64 and ARM64),
even if they are currently needed by Linux code only on one architecture.

Many definitions in hyperv-tlfs.h have historically contained "X64" in the
name, which doesn't make sense for architecture independent definitions.
While many of the occurrences of "X64" have already been removed, some
still remain in definitions that should be arch independent. The
split removes the "X64" from the definitions so that the arch
independent hyper-tlfs.h has no occurrences of "X64". However, to
keep this patch set separate from a wider change in the names, aliases
are added in the x86/x64 specific hyperv-tlfs.h so that existing code
continues to compile.  The definitions can be fixed throughout the code
in a more incremental fashion in separate patches, and then the aliases
can be removed.

Where it is not clear if definitions are arch independent, they have been
kept in the x86/x64 specific file. The Hyper-V team is aiming to have a
version of the TLFS document covering ARM64 by the end of calendar 2020,
so additional definitions may be moved into the arch independent portion
after the new TLFS document is released.

The first two patches in the series clean up the existing hyperv-tlfs.h
file a bit by removing duplicate or unnecessary definitions so they are
not propagated across the split. The third patch does the split, and the
fourth patch adds new definitions that are needed on ARM64 but are generic.

These changes have no functional impact.

Michael Kelley (4):
  KVM: x86: hyperv: Remove duplicate definitions of Reference TSC Page
  x86/hyperv: Remove HV_PROCESSOR_POWER_STATE #defines
  x86/hyperv: Split hyperv-tlfs.h into arch dependent and independent
    files
  asm-generic/hyperv: Add definitions for Get/SetVpRegister hypercalls

 arch/x86/include/asm/hyperv-tlfs.h | 472 +++--------------------------
 arch/x86/include/asm/kvm_host.h    |   2 +-
 arch/x86/kvm/hyperv.c              |   4 +-
 include/asm-generic/hyperv-tlfs.h  | 470 ++++++++++++++++++++++++++++
 4 files changed, 509 insertions(+), 439 deletions(-)
 create mode 100644 include/asm-generic/hyperv-tlfs.h

-- 
2.18.2


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

end of thread, other threads:[~2020-04-22 20:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 17:38 [PATCH 0/4] Split hyperv-tlfs.h into generic and arch specific files Michael Kelley
2020-04-20 17:38 ` [PATCH 1/4] KVM: x86: hyperv: Remove duplicate definitions of Reference TSC Page Michael Kelley
2020-04-21  9:29   ` Wei Liu
2020-04-21 11:16     ` Paolo Bonzini
2020-04-21 11:18       ` Wei Liu
2020-04-21 12:37   ` Vitaly Kuznetsov
2020-04-20 17:38 ` [PATCH 2/4] x86/hyperv: Remove HV_PROCESSOR_POWER_STATE #defines Michael Kelley
2020-04-20 17:38 ` [PATCH 3/4] x86/hyperv: Split hyperv-tlfs.h into arch dependent and independent files Michael Kelley
2020-04-20 17:38 ` [PATCH 4/4] asm-generic/hyperv: Add definitions for Get/SetVpRegister hypercalls Michael Kelley
2020-04-21 13:02   ` Vitaly Kuznetsov
2020-04-21 15:50     ` Michael Kelley
2020-04-22 20:04       ` Michael Kelley
2020-04-21 11:24 ` [PATCH 0/4] Split hyperv-tlfs.h into generic and arch specific files Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).