]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Refactor CPUID 0xD.N sub-leaf entry creation
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 2 Mar 2020 23:56:12 +0000 (15:56 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:58:00 +0000 (17:58 +0100)
commitaab1b8c2aad5b3da7808a826e4ffb35e44b089f4
tree71f120538f6901ee759364ab5ee05506e34503cd
parent7732fcdb9212a08146f24b8b969515bc187f7cc4
KVM: x86: Refactor CPUID 0xD.N sub-leaf entry creation

Increment the number of CPUID entries immediately after do_host_cpuid()
in preparation for moving the logic into do_host_cpuid().  Handle the
rare/impossible case of encountering a bogus sub-leaf by decrementing
the number entries on failure.

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