Commit 056b991
committed
KVM: x86: Use cpu_feature_enabled() for PKU instead of #ifdef
Replace an #ifdef on CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS with a
cpu_feature_enabled() check on X86_FEATURE_PKU. The macro magic of
DISABLED_MASK_BIT_SET() means that cpu_feature_enabled() provides the
same end result (no code generated) when PKU is disabled by Kconfig.
No functional change intended.
Cc: Jon Kohler <jon@nutanix.com>
Reviewed-by: Jon Kohler <jon@nutanix.com>
Link: https://lore.kernel.org/r/20230602010550.785722-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 02f1b0b commit 056b991
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
1020 | | - | |
1021 | | - | |
| 1020 | + | |
1022 | 1021 | | |
1023 | 1022 | | |
1024 | 1023 | | |
1025 | 1024 | | |
1026 | | - | |
1027 | 1025 | | |
1028 | 1026 | | |
1029 | 1027 | | |
| |||
1032 | 1030 | | |
1033 | 1031 | | |
1034 | 1032 | | |
1035 | | - | |
1036 | | - | |
| 1033 | + | |
1037 | 1034 | | |
1038 | 1035 | | |
1039 | 1036 | | |
1040 | 1037 | | |
1041 | 1038 | | |
1042 | 1039 | | |
1043 | | - | |
1044 | 1040 | | |
1045 | 1041 | | |
1046 | 1042 | | |
| |||
0 commit comments