diff options
author | Bryan Cantrill <bryan@joyent.com> | 2011-10-19 16:13:06 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2011-10-19 16:13:06 +0000 |
commit | 57e524c0917596ec7db57166242a62e59e38d719 (patch) | |
tree | eb9ebf0f912de1a7cf959e07f4d140b162f583df | |
parent | 9662c47b72742f8b5f8fcf8c9a440bd43661adf5 (diff) | |
download | illumos-kvm-57e524c0917596ec7db57166242a62e59e38d719.tar.gz |
HVM-679 KVM should refuse to load if EPT is not present
-rw-r--r-- | kvm_vmx.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -49,6 +49,7 @@ static int bypass_guest_pf = 1; static int enable_vpid = 1; static int flexpriority_enabled = 1; static int enable_ept = 1; +static int kvm_vmx_ept_required = 1; static int enable_unrestricted_guest = 1; static int emulate_invalid_guest_state = 0; static kmem_cache_t *kvm_vcpu_cache; @@ -1586,6 +1587,12 @@ vmx_hardware_setup(void) enable_vpid = 0; if (!cpu_has_vmx_ept()) { + if (kvm_vmx_ept_required) { + cmn_err(CE_WARN, "kvm: insufficient hardware support " + "(lacking EPT)\n"); + return (EIO); + } + enable_ept = 0; enable_unrestricted_guest = 0; } |