[lkml]   [2010]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 4/6] export new cpuid KVM_CAP
    On 04/27/2010 10:09 PM, Glauber Costa wrote:
    >> Hmm. We already have an API to get cpuid bits:
    >> KVM_GET_SUPPORTED_CPUID2. The nice thing about it is that it will
    >> mean -cpu host will work out of the box.
    > Ok, from what I understand, KVM_GET_CPUID2 gets a set of features, and tells
    > userspace which of them are available. Right?

    No. KVM_GET_CPUID2 reads what was set by KVM_SET_CPUID, as modified by
    the guest executing the cpuid instruction. KVM_GET_SUPPORTED_CPUID
    tells userspace which bits are supported by the host cpu and kvm.

    > If this is the case, userspace could ask for 0xffffffff, and then we tell them
    > which of them are present.
    > Does that make sense?

    The API for KVM_GET_SUPPORTED_CPUID returns all cpuid leaves supported
    in one go, IIRC.

    Do not meddle in the internals of kernels, for they are subtle and quick to panic.

     \ /
      Last update: 2010-04-27 21:23    [W:0.021 / U:16.048 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site