kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, kvm@vger.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Jon Doron <arilou@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/7] KVM: x86: hyper-v: make KVM_GET_SUPPORTED_HV_CPUID more useful
Date: Fri, 25 Sep 2020 22:33:04 +0200	[thread overview]
Message-ID: <3b4186ec-84dc-a146-6c0c-cbc62195beab@redhat.com> (raw)
In-Reply-To: <20200924145757.1035782-1-vkuznets@redhat.com>

On 24/09/20 16:57, Vitaly Kuznetsov wrote:
> Changes since v1:
> - Rebased to kvm/queue [KVM_CAP_SYS_HYPERV_CPUID -> 188]
> 
> QEMU series using the feature:
> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg02017.html
> 
> Original description:
> 
> KVM_GET_SUPPORTED_HV_CPUID was initially implemented as a vCPU ioctl but
> this is not very useful when VMM is just trying to query which Hyper-V
> features are supported by the host prior to creating VM/vCPUs. The data
> in KVM_GET_SUPPORTED_HV_CPUID is mostly static with a few exceptions but
> it seems we can change this. Add support for KVM_GET_SUPPORTED_HV_CPUID as
> a system ioctl as well.
> 
> QEMU specific description:
> In some cases QEMU needs to collect the information about which Hyper-V
> features are supported by KVM and pass it up the stack. For non-hyper-v
> features this is done with system-wide KVM_GET_SUPPORTED_CPUID/
> KVM_GET_MSRS ioctls but Hyper-V specific features don't get in the output
> (as Hyper-V CPUIDs intersect with KVM's). In QEMU, CPU feature expansion
> happens before any KVM vcpus are created so KVM_GET_SUPPORTED_HV_CPUID
> can't be used in its current shape.
> 
> Vitaly Kuznetsov (7):
>   KVM: x86: hyper-v: Mention SynDBG CPUID leaves in api.rst
>   KVM: x86: hyper-v: disallow configuring SynIC timers with no SynIC
>   KVM: x86: hyper-v: make KVM_GET_SUPPORTED_HV_CPUID output independent
>     of eVMCS enablement
>   KVM: x86: hyper-v: always advertise HV_STIMER_DIRECT_MODE_AVAILABLE
>   KVM: x86: hyper-v: drop now unneeded vcpu parameter from
>     kvm_vcpu_ioctl_get_hv_cpuid()
>   KVM: x86: hyper-v: allow KVM_GET_SUPPORTED_HV_CPUID as a system ioctl
>   KVM: selftests: test KVM_GET_SUPPORTED_HV_CPUID as a system ioctl
> 
>  Documentation/virt/kvm/api.rst                | 12 +--
>  arch/x86/include/asm/kvm_host.h               |  2 +-
>  arch/x86/kvm/hyperv.c                         | 30 ++++----
>  arch/x86/kvm/hyperv.h                         |  3 +-
>  arch/x86/kvm/vmx/evmcs.c                      |  8 +-
>  arch/x86/kvm/vmx/evmcs.h                      |  2 +-
>  arch/x86/kvm/x86.c                            | 44 ++++++-----
>  include/uapi/linux/kvm.h                      |  3 +-
>  .../testing/selftests/kvm/include/kvm_util.h  |  2 +
>  tools/testing/selftests/kvm/lib/kvm_util.c    | 26 +++++++
>  .../selftests/kvm/x86_64/hyperv_cpuid.c       | 77 +++++++++----------
>  11 files changed, 120 insertions(+), 89 deletions(-)
> 

Queued patches 1-2 while we discuss the rest, thanks.

Paolo


      parent reply	other threads:[~2020-09-25 20:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 14:57 [PATCH v2 0/7] KVM: x86: hyper-v: make KVM_GET_SUPPORTED_HV_CPUID more useful Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 1/7] KVM: x86: hyper-v: Mention SynDBG CPUID leaves in api.rst Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 2/7] KVM: x86: hyper-v: disallow configuring SynIC timers with no SynIC Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 3/7] KVM: x86: hyper-v: make KVM_GET_SUPPORTED_HV_CPUID output independent of eVMCS enablement Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 4/7] KVM: x86: hyper-v: always advertise HV_STIMER_DIRECT_MODE_AVAILABLE Vitaly Kuznetsov
2020-09-25 20:32   ` Paolo Bonzini
2020-09-29 10:36     ` Vitaly Kuznetsov
2020-09-29 11:03       ` Paolo Bonzini
2020-09-29 11:26         ` Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 5/7] KVM: x86: hyper-v: drop now unneeded vcpu parameter from kvm_vcpu_ioctl_get_hv_cpuid() Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 6/7] KVM: x86: hyper-v: allow KVM_GET_SUPPORTED_HV_CPUID as a system ioctl Vitaly Kuznetsov
2020-09-24 14:57 ` [PATCH v2 7/7] KVM: selftests: test " Vitaly Kuznetsov
2020-09-25 20:33 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b4186ec-84dc-a146-6c0c-cbc62195beab@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=arilou@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).