Skip to content
Permalink
Browse files

Explicitly disable VMCS shadowing

MacOSX 10.15 hypervisor framework supports VMCS shadowing.

VM creation fails with:

vmx_set_ctlreg: cap_field: 2 bit: 14 unspecified don't care
vmx_init: processor does not support desired secondary processor-based controls
Unable to create VM (22)

Add the VMCS shadow control bit to the list of disabled controls.

Signed-off-by: John Coyle <dx9err@gmail.com>
  • Loading branch information...
dx9 committed Sep 16, 2019
1 parent 1dd9a51 commit 0c3c50a971f4fdc0d25cbeb06cdecce8fbaeef92
Showing with 3 additions and 1 deletion.
  1. +1 −0 include/xhyve/vmm/intel/vmx_controls.h
  2. +2 −1 src/vmm/intel/vmx.c
@@ -72,6 +72,7 @@
#define PROCBASED2_PAUSE_LOOP_EXITING (1u << 10)
#define PROCBASED2_RDRAND_EXITING (1u << 11)
#define PROCBASED2_ENABLE_INVPCID (1u << 12)
#define PROCBASED2_VMCS_SHADOW (1u << 14)
#define PROCBASED2_RDSEED_EXITING (1u << 16)

/* VM Exit Controls */
@@ -89,7 +89,8 @@
PROCBASED2_PAUSE_LOOP_EXITING /* FIXME */ | \
PROCBASED2_RDRAND_EXITING | \
PROCBASED2_ENABLE_INVPCID /* FIXME */ | \
PROCBASED2_RDSEED_EXITING)
PROCBASED2_RDSEED_EXITING | \
PROCBASED2_VMCS_SHADOW )
#define PINBASED_CTLS_ONE_SETTING \
(PINBASED_EXTINT_EXITING | \
PINBASED_NMI_EXITING | \

0 comments on commit 0c3c50a

Please sign in to comment.
You can’t perform that action at this time.