KVM: x86: skip host CPUID call for hypervisor leaves
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Oct 2021 17:15:55 +0000 (13:15 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 18:47:16 +0000 (13:47 -0500)
commit2746a6b72ab9a92bd188c4ac3e4122ee1c18f754
treee6158f71d1ee8f01ea9bb57d6de43329714c4ab4
parent9d68c6f60eb1fe9f0610cb26e54d466ea1d15278
KVM: x86: skip host CPUID call for hypervisor leaves

Hypervisor leaves are always synthesized by __do_cpuid_func; just return
zeroes and do not ask the host.  Even on nested virtualization, a value
from another hypervisor would be bogus, because all hypercalls and MSRs
are processed by KVM.

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c