]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Refactor out-of-range logic to contain the madness
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 5 Mar 2020 01:34:36 +0000 (17:34 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:58:49 +0000 (17:58 +0100)
commit0c9c61b684792c946d2f50108760fcd3db9b4f54
treecde0fb68ae95792090d01d42e57a87d51ccae285
parentbf17c4938eff9f38c4d5868c931d87fffbd55b67
KVM: x86: Refactor out-of-range logic to contain the madness

Move all of the out-of-range logic into a single helper,
get_out_of_range_cpuid_entry(), to avoid an extra lookup of CPUID.0.0
and to provide a single location for documenting the out-of-range
behavior.

No functional change intended.

Cc: Jim Mattson <jmattson@google.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c