Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Fix broken IsVTXDisabled detection on AMD CPU
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
afbjorklund committed Mar 2, 2019
1 parent 61ef47d commit 173a41d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtualbox/vtx_intel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 173a41d

Please sign in to comment.