mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add block 3 features to /proc/cpuinfo
Linux added these block 3 features to the end of /proc/cpuinfo in dfb4a70f20c5b3880da56ee4c9484bdb4e8f1e65. This also fixes that block 3 features were completely missing from FeatureSet.FlagsString(false) because FlagsString only prints Linux blocks regardless of the cpuinfo option. PiperOrigin-RevId: 218913816 Change-Id: I2f9c38c7c9da4b247a140877d4aca782e80684bd
This commit is contained in:
+7
-7
@@ -222,7 +222,7 @@ const (
|
||||
// which doesn't match well here, so for the /proc/cpuinfo generation we simply
|
||||
// re-map the blocks to Linux's ordering and then go through the bits in each
|
||||
// block.
|
||||
var linuxBlockOrder = []block{1, 6, 0, 5, 2, 4}
|
||||
var linuxBlockOrder = []block{1, 6, 0, 5, 2, 4, 3}
|
||||
|
||||
// To make emulation of /proc/cpuinfo easy down the line, these names match the
|
||||
// names of the basic features in Linux defined in
|
||||
@@ -317,6 +317,12 @@ var x86FeatureStrings = map[Feature]string{
|
||||
X86FeatureAVX512BW: "avx512bw",
|
||||
X86FeatureAVX512VL: "avx512vl",
|
||||
|
||||
// Block 3.
|
||||
X86FeaturePREFETCHWT1: "prefetchwt1",
|
||||
X86FeatureAVX512VBMI: "avx512vbmi",
|
||||
X86FeatureUMIP: "umip",
|
||||
X86FeaturePKU: "pku",
|
||||
|
||||
// Block 4.
|
||||
X86FeatureXSAVEOPT: "xsaveopt",
|
||||
X86FeatureXSAVEC: "xsavec",
|
||||
@@ -348,12 +354,6 @@ var x86FeatureParseOnlyStrings = map[Feature]string{
|
||||
X86FeatureIPT: "pt",
|
||||
X86FeatureCLFLUSHOPT: "clfushopt",
|
||||
|
||||
// Block 3.
|
||||
X86FeaturePREFETCHWT1: "prefetchwt1",
|
||||
X86FeatureAVX512VBMI: "avx512vbmi",
|
||||
X86FeatureUMIP: "umip",
|
||||
X86FeaturePKU: "pku",
|
||||
|
||||
// Block 4.
|
||||
X86FeatureXSAVES: "xsaves",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user