KVM: x86: Open code vendor_intel() in string_registers_quirk()
authorSean Christopherson <seanjc@google.com>
Fri, 5 Apr 2024 23:56:02 +0000 (16:56 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 10 Jun 2024 21:29:39 +0000 (14:29 -0700)
commitbdaff4f92bcee7a6205f3544bb94e2d16ad98f6b
treeffe73def083ee320491b445a93b3006432a0b556
parent4067c2395e80e5109b485f1928a797be17d758ae
KVM: x86: Open code vendor_intel() in string_registers_quirk()

Open code the is_guest_vendor_intel() check in string_registers_quirk() to
discourage makiking exact vendor==Intel checks in the emulator, and to
remove the rather awful #ifdeffery.

The string quirk is literally the only Intel specific, *non-architectural*
behavior that KVM emulates.  All Intel specific behavior that is
architecturally defined applies to all vendors that are compatible with
Intel's architecture, i.e. should use guest_cpuid_is_intel_compatible().

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