Skip to content

Commit 7c1ef59

Browse files
Fenghua Yusuryasaimadhu
authored andcommitted
x86/cpufeatures: Re-enable ENQCMD
The ENQCMD feature can only be used if CONFIG_INTEL_IOMMU_SVM is set. Add X86_FEATURE_ENQCMD to the disabled features mask as appropriate so that cpu_feature_enabled() can be used to check the feature. [ bp: Massage commit message. ] Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fa6af69 commit 7c1ef59

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/x86/include/asm/disabled-features.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@
5656
# define DISABLE_PTI (1 << (X86_FEATURE_PTI & 31))
5757
#endif
5858

59-
/* Force disable because it's broken beyond repair */
60-
#define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
59+
#ifdef CONFIG_INTEL_IOMMU_SVM
60+
# define DISABLE_ENQCMD 0
61+
#else
62+
# define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
63+
#endif
6164

6265
#ifdef CONFIG_X86_SGX
6366
# define DISABLE_SGX 0

0 commit comments

Comments
 (0)