aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2022-11-25 20:58:38 +0800
committerPaolo Bonzini <[email protected]>2022-11-28 13:33:25 -0500
commitc4690d016182d271a862767145db8b2bc792f4a8 (patch)
treefcd1642b971fb2eda321154a67ee7a81e6131138 /drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
parent7927e27549d3f02354233a9ab3f28e0080ede29b (diff)
KVM: x86: Add BUILD_BUG_ON() to detect bad usage of "scattered" flags
Add a compile-time assert in the SF() macro to detect improper usage, i.e. to detect passing in an X86_FEATURE_* flag that isn't actually scattered by the kernel. Upcoming feature flags will be 100% KVM-only and will have X86_FEATURE_* macros that point at a kvm_only_cpuid_leafs word, not a kernel-defined word. Using SF() and thus boot_cpu_has() for such feature flags would access memory beyond x86_capability[NCAPINTS] and at best incorrectly hide a feature, and at worst leak kernel state to userspace. Signed-off-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c')
0 files changed, 0 insertions, 0 deletions