mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Expose XSAVES in /proc/cpuinfo
Linux started doing this in b8be15d588060a03569ac85dc4a0247460988f5b
("x86/fpu/xstate: Re-enable XSAVES"), which first appeared in 4.8.
PiperOrigin-RevId: 233800931
Change-Id: Icac2c2b03ccf1a91f3070431efb5152ca619fca3
This commit is contained in:
+1
-3
@@ -361,6 +361,7 @@ var x86FeatureStrings = map[Feature]string{
|
||||
X86FeatureXSAVEOPT: "xsaveopt",
|
||||
X86FeatureXSAVEC: "xsavec",
|
||||
X86FeatureXGETBV1: "xgetbv1",
|
||||
X86FeatureXSAVES: "xsaves",
|
||||
|
||||
// Block 5.
|
||||
X86FeatureLAHF64: "lahf_lm", // LAHF/SAHF in long mode
|
||||
@@ -415,9 +416,6 @@ var x86FeatureParseOnlyStrings = map[Feature]string{
|
||||
|
||||
// Block 3.
|
||||
X86FeaturePREFETCHWT1: "prefetchwt1",
|
||||
|
||||
// Block 4.
|
||||
X86FeatureXSAVES: "xsaves",
|
||||
}
|
||||
|
||||
// Just a way to wrap cpuid function numbers.
|
||||
|
||||
@@ -114,6 +114,11 @@ func TestHostFeatureFlags(t *testing.T) {
|
||||
// PKU only exposed in dfb4a70f20c5b3880da56ee4c9484bdb4e8f1e65
|
||||
// (4.9).
|
||||
continue
|
||||
// Block 4.
|
||||
case f == X86FeatureXSAVES && (major < 4 || major == 4 && minor < 8):
|
||||
// XSAVES only exposed in
|
||||
// b8be15d588060a03569ac85dc4a0247460988f5b (4.8).
|
||||
continue
|
||||
}
|
||||
|
||||
hidden := f.flagString(true) == ""
|
||||
|
||||
Reference in New Issue
Block a user