@@ -263,28 +263,33 @@ static void __init probe_page_size_mask(void)
263
263
}
264
264
265
265
/*
266
- * INVLPG may not properly flush Global entries
267
- * on these CPUs when PCIDs are enabled .
266
+ * INVLPG may not properly flush Global entries on
267
+ * these CPUs. New microcode fixes the issue .
268
268
*/
269
269
static const struct x86_cpu_id invlpg_miss_ids [] = {
270
- X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE , 0 ),
271
- X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE_L , 0 ),
272
- X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE_N , 0 ),
273
- X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE , 0 ),
274
- X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_P , 0 ),
275
- X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_S , 0 ),
270
+ X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE , 0x2e ),
271
+ X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE_L , 0x42c ),
272
+ X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE_N , 0x11 ),
273
+ X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE , 0x118 ),
274
+ X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_P , 0x4117 ),
275
+ X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_S , 0x2e ),
276
276
{}
277
277
};
278
278
279
279
static void setup_pcid (void )
280
280
{
281
+ const struct x86_cpu_id * invlpg_miss_match ;
282
+
281
283
if (!IS_ENABLED (CONFIG_X86_64 ))
282
284
return ;
283
285
284
286
if (!boot_cpu_has (X86_FEATURE_PCID ))
285
287
return ;
286
288
287
- if (x86_match_cpu (invlpg_miss_ids )) {
289
+ invlpg_miss_match = x86_match_cpu (invlpg_miss_ids );
290
+
291
+ if (invlpg_miss_match &&
292
+ boot_cpu_data .microcode < invlpg_miss_match -> driver_data ) {
288
293
pr_info ("Incomplete global flushes, disabling PCID" );
289
294
setup_clear_cpu_cap (X86_FEATURE_PCID );
290
295
return ;
0 commit comments