@@ -80,6 +80,7 @@ const (
8080 SGX // Software Guard Extensions
8181 IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB)
8282 STIBP // Single Thread Indirect Branch Predictors
83+ VMX // Virtual Machine Extensions
8384
8485 // Performance indicators
8586 SSE2SLOW // SSE2 is supported, but usually not faster
@@ -137,6 +138,7 @@ var flagNames = map[Flags]string{
137138 SGX : "SGX" , // Software Guard Extensions
138139 IBPB : "IBPB" , // Indirect Branch Restricted Speculation and Indirect Branch Predictor Barrier
139140 STIBP : "STIBP" , // Single Thread Indirect Branch Predictors
141+ VMX : "VMX" , // Virtual Machine Extensions
140142
141143 // Performance indicators
142144 SSE2SLOW : "SSE2SLOW" , // SSE2 supported, but usually not faster
@@ -223,6 +225,11 @@ func (c CPUInfo) Amd3dnowExt() bool {
223225 return c .Features & AMD3DNOWEXT != 0
224226}
225227
228+ // VMX indicates support of VMX
229+ func (c CPUInfo ) VMX () bool {
230+ return c .Features & VMX != 0
231+ }
232+
226233// MMX indicates support of MMX instructions
227234func (c CPUInfo ) MMX () bool {
228235 return c .Features & MMX != 0
@@ -820,6 +827,9 @@ func support() Flags {
820827 if (c & 1 ) != 0 {
821828 rval |= SSE3
822829 }
830+ if (c & (1 << 5 )) != 0 {
831+ rval |= VMX
832+ }
823833 if (c & 0x00000200 ) != 0 {
824834 rval |= SSSE3
825835 }
0 commit comments