KVM: x86/mmu: Use IS_ENABLED() to avoid RETPOLINE for TDP page faults
authorSean Christopherson <seanjc@google.com>
Sat, 23 Apr 2022 03:47:48 +0000 (03:47 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 May 2022 13:51:43 +0000 (09:51 -0400)
commit8d5265b1016369836c0735ed40933e179f186630
treee75ec8387cedeea09c18db6aa0f41062e98f6726
parent8a009d5bca0af7385880123d12081713f7066904
KVM: x86/mmu: Use IS_ENABLED() to avoid RETPOLINE for TDP page faults

Use IS_ENABLED() instead of an #ifdef to activate the anti-RETPOLINE fast
path for TDP page faults.  The generated code is identical, and the #ifdef
makes it dangerously difficult to extend the logic (guess who forgot to
add an "else" inside the #ifdef and ran through the page fault handler
twice).

No functional or binary change intented.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220423034752.1161007-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu_internal.h