Message ID | 20200819064707.1033569-9-xiaoyao.li@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: Add virtualization support of split lock detection | expand |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 5f44e0de04b9..b16f3dd9b9c2 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -1052,6 +1052,7 @@ static void __init split_lock_setup(void) return; } + cpu_model_supports_sld = true; setup_force_cpu_cap(X86_FEATURE_SPLIT_LOCK_DETECT); if (state == sld_fatal) setup_force_cpu_cap(X86_FEATURE_SLD_FATAL); @@ -1203,6 +1204,5 @@ void __init cpu_set_core_cap_bits(struct cpuinfo_x86 *c) return; } - cpu_model_supports_sld = true; split_lock_setup(); }
It should be more resonable to set cpu_model_supports_sld to true after BSP is verified to have feature split lock detection. It also avoids externing the cpu_model_supports_sld when enumerate the split lock detection in a guest via PV interface in a future patch. Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> --- arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)