diff options
author | Juergen Gross <jgross@suse.com> | 2022-11-04 08:27:01 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-11-22 16:18:19 +0100 |
commit | 6007878a782eb96f50a71c3a06cf3e931cf8aac1 (patch) | |
tree | 30673922344dfeecd3b80067a98e19690b92b678 /arch/x86/kernel/process_64.c | |
parent | d76c4f7a610ac56c5b06e34258859945e77d190c (diff) | |
download | linux-stable-6007878a782eb96f50a71c3a06cf3e931cf8aac1.tar.gz linux-stable-6007878a782eb96f50a71c3a06cf3e931cf8aac1.tar.bz2 linux-stable-6007878a782eb96f50a71c3a06cf3e931cf8aac1.zip |
x86/cpu: Switch to cpu_feature_enabled() for X86_FEATURE_XENPV
Convert the remaining cases of static_cpu_has(X86_FEATURE_XENPV) and
boot_cpu_has(X86_FEATURE_XENPV) to use cpu_feature_enabled(), allowing
more efficient code in case the kernel is configured without
CONFIG_XEN_PV.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20221104072701.20283-6-jgross@suse.com
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 6b3418bff326..e2f469175be8 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -165,7 +165,7 @@ static noinstr unsigned long __rdgsbase_inactive(void) lockdep_assert_irqs_disabled(); - if (!static_cpu_has(X86_FEATURE_XENPV)) { + if (!cpu_feature_enabled(X86_FEATURE_XENPV)) { native_swapgs(); gsbase = rdgsbase(); native_swapgs(); @@ -190,7 +190,7 @@ static noinstr void __wrgsbase_inactive(unsigned long gsbase) { lockdep_assert_irqs_disabled(); - if (!static_cpu_has(X86_FEATURE_XENPV)) { + if (!cpu_feature_enabled(X86_FEATURE_XENPV)) { native_swapgs(); wrgsbase(gsbase); native_swapgs(); |