3

There are already several questions about how to enable virtualization on Macs (e.g. How to enable support of CPU virtualization on Macbook Pro?). It is often reported that sysctl -a | grep 'machdep.cpu.feature.*VMX' should match, but with a caveat: matching means that virtualization is supported by the cpu, not that it is enabled.

Is there a way to check that virtualization is enabled? I'm ready to compile and run a small program if that's what it takes to be able to answer, but I'd rather not.

akim
  • 8,255
  • 3
  • 44
  • 60

1 Answers1

3

There are 3 things which basically tells you if Intel VMX is supported and enabled on a machine or not. This is not OS specific but specific to Intel boards.

  1. CPUID.1 will tell you in ecx.BIT[5] == 1 if CPU supports vmx.
  2. IA32_FEATURE_CONTROL MSR BIT.2 == 1 will tell you if VMX is enabled in normal mode. If BIT.2 is 0 and BIT.0 is 1 in this MSR, this means VMX is disabled and locked in BIOS. You would need to reboot and enable that in BIOS.
  3. Control Register CR4.BIT.13[VMXE] == 1 will tell you that VMX is enabled now on the machine. CPU will GPF if CR4.VMXE bit is cleared and you try to execute a VMXON instruction to enter VMX root mode.

You can write a small program to do this and check what you are missing.

abhi
  • 3,476
  • 5
  • 41
  • 58