]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Bury guest_cpuid_is_amd_or_hygon() in cpuid.c
authorSean Christopherson <seanjc@google.com>
Fri, 5 Apr 2024 23:56:03 +0000 (16:56 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 10 Jun 2024 21:29:39 +0000 (14:29 -0700)
commit1028893a73fe20b2d1b90b4a6005b288286b9309
treecc05bfef7060865a5e74231c9f47b6aeae8f085f
parentbdaff4f92bcee7a6205f3544bb94e2d16ad98f6b
KVM: x86: Bury guest_cpuid_is_amd_or_hygon() in cpuid.c

Move guest_cpuid_is_amd_or_hygon() into cpuid.c now that, except for one
Intel quirk in the emulator, KVM checks for AMD vs. Intel *compatible*
vCPUs, not exact vendors, i.e. now that there should not be any reason for
KVM at-large to care about the exact vendor.

Opportunistically refactor the guts of the helper to use "entry" instead
of "best", and short circuit the !entry path to make the common case more
readable.

Link: https://lore.kernel.org/r/20240405235603.1173076-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/cpuid.h