Fix broken IsVTXDisabled detection on AMD CPU

VMX is in FeatureNames, but SVM is in ExtraFeatureNames
This meant that detection *always* failed for SVM (AMD)

Thanks to user @hilbertxia

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
This commit is contained in:
Anders F Björklund
2019-03-02 14:12:46 +01:00
parent 61ef47dc5d
commit 173a41dd53

View File

@@ -6,7 +6,7 @@ import "github.com/intel-go/cpuid"
// IsVTXDisabled checks if VT-x is disabled in the CPU.
func (d *Driver) IsVTXDisabled() bool {
if cpuid.HasFeature(cpuid.VMX) || cpuid.HasFeature(cpuid.SVM) {
if cpuid.HasFeature(cpuid.VMX) || cpuid.HasExtraFeature(cpuid.SVM) {
return false
}