public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] x86/kvm/hyper-v: Implement KVM_GET_SUPPORTED_HV_CPUID
@ 2018-12-06 16:58 Vitaly Kuznetsov
  2018-12-06 16:58 ` [PATCH 1/6] x86/hyper-v: Do some housekeeping in hyperv-tlfs.h Vitaly Kuznetsov
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Vitaly Kuznetsov @ 2018-12-06 16:58 UTC (permalink / raw)
  To: kvm
  Cc: Paolo Bonzini, Radim Krčmář, linux-kernel,
	Roman Kagan, K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger,
	x86, Michael Kelley (EOSG), Eduardo Habkost

As suggested by Paolo, introduce new KVM_GET_SUPPORTED_HV_CPUID returning
all Hyper-V CPUID feature leaves, this way we won't need to add a new
KVM_CAP_HYPERV_* for every new Hyper-V enlightenment we implement in
KVM.

(Using the existing KVM_GET_SUPPORTED_CPUID doesn't seem to be possible:
Hyper-V CPUID feature leaves intersect with KVM's (e.g. 0x40000000,
0x40000001) and we would probably confuse userspace in case we decide to
return these twice).

This patch series also does some housekeeping work in hyperv-tlfs.h, adds a
simple selftest (that's how I actually checked that the newly added ioctl
works) and removes recently added KVM_CAP_HYPERV_STIMER_DIRECT before it's
too late.

Vitaly Kuznetsov (6):
  x86/hyper-v: Do some housekeeping in hyperv-tlfs.h
  x86/hyper-v: Drop HV_X64_CONFIGURE_PROFILER definition
  x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper
  x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID
  x86/kvm/hyper-v: Drop KVM_CAP_HYPERV_STIMER_DIRECT
  KVM: selftests: Add hyperv_cpuid test

 arch/x86/include/asm/hyperv-tlfs.h            | 185 +++++++++---------
 arch/x86/include/asm/kvm_host.h               |   1 +
 arch/x86/kvm/hyperv.c                         | 131 ++++++++++++-
 arch/x86/kvm/hyperv.h                         |   2 +
 arch/x86/kvm/svm.c                            |   7 +
 arch/x86/kvm/vmx.c                            |  24 ++-
 arch/x86/kvm/x86.c                            |  21 +-
 include/uapi/linux/kvm.h                      |   5 +-
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../selftests/kvm/x86_64/hyperv_cpuid.c       | 142 ++++++++++++++
 10 files changed, 413 insertions(+), 106 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c

-- 
2.19.2

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

end of thread, other threads:[~2018-12-09 22:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-06 16:58 [PATCH 0/6] x86/kvm/hyper-v: Implement KVM_GET_SUPPORTED_HV_CPUID Vitaly Kuznetsov
2018-12-06 16:58 ` [PATCH 1/6] x86/hyper-v: Do some housekeeping in hyperv-tlfs.h Vitaly Kuznetsov
2018-12-09 17:42   ` Michael Kelley
2018-12-06 16:58 ` [PATCH 2/6] x86/hyper-v: Drop HV_X64_CONFIGURE_PROFILER definition Vitaly Kuznetsov
2018-12-09 17:45   ` Michael Kelley
2018-12-06 16:58 ` [PATCH 3/6] x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper Vitaly Kuznetsov
2018-12-06 16:58 ` [PATCH 4/6] x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID Vitaly Kuznetsov
2018-12-09 22:54   ` Vitaly Kuznetsov
2018-12-06 16:58 ` [PATCH 5/6] x86/kvm/hyper-v: Drop KVM_CAP_HYPERV_STIMER_DIRECT Vitaly Kuznetsov
2018-12-06 16:58 ` [PATCH 6/6] KVM: selftests: Add hyperv_cpuid test Vitaly Kuznetsov

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