]> 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)
commit61c87ef7b1a35b1c9ad3d2ffd539c542a83a15b7
treecde0fb68ae95792090d01d42e57a87d51ccae285
parenta1722969dfa3d3b30613b546d09be8403c4c4418
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