[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871s6qe2gc.fsf@vitty.brq.redhat.com>
Date: Sun, 09 Dec 2018 23:54:11 +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: Re: [PATCH 4/6] x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID
Vitaly Kuznetsov <vkuznets@...hat.com> writes:
> With every new Hyper-V Enlightenment we implement we're forced to add a
> KVM_CAP_HYPERV_* capability. While this approach works it is fairly
> inconvenient: the majority of the enlightenments we do have corresponding
> CPUID feature bit(s) and userspace has to know this anyways to be able to
> expose the feature to the guest.
>
> Add KVM_GET_SUPPORTED_HV_CPUID ioctl (backed by KVM_CAP_HYPERV_CPUID, "one
> cap to rule them all!") returning all Hyper-V CPUID feature leaves.
>
> 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.
>
> KVM_CAP_HYPERV_CPUID's number is interim: we're intended to drop
> KVM_CAP_HYPERV_STIMER_DIRECT and use its number instead.
>
> Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
> arch/x86/kvm/hyperv.c | 127 +++++++++++++++++++++++++++++++++++++++
> arch/x86/kvm/hyperv.h | 2 +
> arch/x86/kvm/x86.c | 20 ++++++
> include/uapi/linux/kvm.h | 4 ++
Well, this is a bit embarrassing but apparently I forgot to document both
KVM_GET_SUPPORTED_HV_CPUID and KVM_CAP_HYPERV_CPUID (I, as usual was
postponing documentation writing for as long as I could - and then just
sent this out).
Stay tuned, v2 is coming.
--
Vitaly
Powered by blists - more mailing lists