[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181206165825.1832-1-vkuznets@redhat.com>
Date: Thu, 6 Dec 2018 17:58:19 +0100
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: kvm@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
linux-kernel@...r.kernel.org, Roman Kagan <rkagan@...tuozzo.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>, x86@...nel.org,
"Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
Eduardo Habkost <ehabkost@...hat.com>
Subject: [PATCH 0/6] x86/kvm/hyper-v: Implement KVM_GET_SUPPORTED_HV_CPUID
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
Powered by blists - more mailing lists