Skip to content

Commit

Permalink
Deflake cpuid_parse_test.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 632336195
  • Loading branch information
nixprime authored and gvisor-bot committed May 10, 2024
1 parent 13c9b72 commit e77a65a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cpuid/cpuid_parse_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e77a65a

Please sign in to comment.