From e77a65a7ffe11f32f2d3567dd455f37908bdf3cf Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Thu, 9 May 2024 18:53:20 -0700 Subject: [PATCH] Deflake cpuid_parse_test. PiperOrigin-RevId: 632336195 --- pkg/cpuid/cpuid_parse_amd64_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/cpuid/cpuid_parse_amd64_test.go b/pkg/cpuid/cpuid_parse_amd64_test.go index 519d72f5e..8b79d573f 100644 --- a/pkg/cpuid/cpuid_parse_amd64_test.go +++ b/pkg/cpuid/cpuid_parse_amd64_test.go @@ -54,6 +54,14 @@ func archSkipFeature(feature Feature, version hostos.Version) bool { // PERFCTR_LLC renamed in // 910448bbed066ab1082b510eef1ae61bb792d854 (4.14). return true + // Block 7. + case feature == X86FeatureARCH_CAPABILITIES: + // This feature is sometimes added by CPU microcode loaded by the + // kernel, in which case it will appear in CPUID but not /proc/cpuinfo. + // This can be detected from a "x86/CPU: CPU features have changed + // after loading microcode, but might not take effect" message printed + // to dmesg by arch/x86/kernel/cpu/common.c:microcode_check(). + return true default: return false }