Skip to content
  • Sean Christopherson's avatar
    x86/cpufeatures: Remove get_scattered_cpuid_leaf() · 43500e6f
    Sean Christopherson authored
    get_scattered_cpuid_leaf() was added[1] to help KVM rebuild hardware-
    defined leafs that are rearranged by Linux to avoid bloating the
    x86_capability array. Eventually, the last consumer of the function was
    removed[2], but the function itself was kept, perhaps even intentionally
    as a form of documentation.
    Remove get_scattered_cpuid_leaf() as it is currently not used by KVM.
    Furthermore, simply rebuilding the "real" leaf does not resolve all of
    KVM's woes when it comes to exposing a scattered CPUID feature, i.e.
    keeping the function as documentation may be counter-productive in some
    scenarios, e.g. when KVM needs to do more than simply expose the leaf.
    [1] 47bdf337 ("x86/cpuid: Provide get_scattered_cpuid_leaf()")
    [2] b7b27aa0
     ("KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX")
    Signed-off-by: default avatarSean Christopherson <>
    Signed-off-by: default avatarBorislav Petkov <>
    CC: "H. Peter Anvin" <>
    CC: Ingo Molnar <>
    Cc: Paolo Bonzini <>
    Cc: Radim Krčmář <>
    CC: Thomas Gleixner <>
    CC: x86-ml <>