// +build 386 amd64

package virtualbox

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.HasExtraFeature(cpuid.SVM) {
		return false
	}

	return true
}

// +build 386 amd64

package virtualbox

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) {
		return false
	}

	return true
}

--- 
+++ 
@@ -6,7 +6,7 @@
 
 // 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
 	}
 
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 <c6169fcaa665ed956024051b5047d142d4ac3fe5@gmail.com>
