]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Immediately fail the build when possible if required #define is missing
authorSean Christopherson <seanjc@google.com>
Mon, 2 Mar 2026 21:26:19 +0000 (13:26 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 12 Mar 2026 17:56:36 +0000 (10:56 -0700)
commit55be358e17af4aa218f173cd6eb17a0dc423cd70
tree69a1c16fa4600aedf71b7149ca115922467f563e
parent00d572d4cd7d23f9a7a498d2d824b68ba3ea5b88
KVM: x86: Immediately fail the build when possible if required #define is missing

Guard usage of the must-be-defined macros in KVM's multi-include headers
with the existing #ifdefs that attempt to alert the developer to a missing
macro, and spit out an explicit #error message if a macro is missing, as
referencing the missing macro completely defeats the purpose of the #ifdef
(the compiler spews a ton of error messages and buries the targeted error
message).

Suggested-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>
Link: https://patch.msgid.link/20260302212619.710873-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm-x86-ops.h
arch/x86/include/asm/kvm-x86-pmu-ops.h
arch/x86/kvm/vmx/vmcs_shadow_fields.h