summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-10-19 16:13:06 +0000
committerBryan Cantrill <bryan@joyent.com>2011-10-19 16:13:06 +0000
commit57e524c0917596ec7db57166242a62e59e38d719 (patch)
treeeb9ebf0f912de1a7cf959e07f4d140b162f583df
parent9662c47b72742f8b5f8fcf8c9a440bd43661adf5 (diff)
downloadillumos-kvm-57e524c0917596ec7db57166242a62e59e38d719.tar.gz
HVM-679 KVM should refuse to load if EPT is not present
-rw-r--r--kvm_vmx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kvm_vmx.c b/kvm_vmx.c
index 1683c4c..6894ef6 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -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;
}