Skip to content

Commit

Permalink
Explicitly disable VMCS shadowing
Browse files Browse the repository at this point in the history
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 0c3c50a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/xhyve/vmm/intel/vmx_controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/vmm/intel/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 | \
Expand Down

0 comments on commit 0c3c50a

Please sign in to comment.