Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202313
b: refs/heads/master
c: 4bc9b98
h: refs/heads/master
i:
  202311: 447ec33
v: v3
  • Loading branch information
Sheng Yang authored and Avi Kivity committed Aug 1, 2010
1 parent a92e48a commit b80084b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2d7a61127ced8ce9ec7666991aad1d846932212
refs/heads/master: 4bc9b9828150747386130ab172f7e868e1a0fc2a
8 changes: 7 additions & 1 deletion trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ static inline bool cpu_has_vmx_ept_1g_page(void)
return vmx_capability.ept & VMX_EPT_1GB_PAGE_BIT;
}

static inline bool cpu_has_vmx_ept_4levels(void)
{
return vmx_capability.ept & VMX_EPT_PAGE_WALK_4_BIT;
}

static inline bool cpu_has_vmx_invept_individual_addr(void)
{
return vmx_capability.ept & VMX_EPT_EXTENT_INDIVIDUAL_BIT;
Expand Down Expand Up @@ -1568,7 +1573,8 @@ static __init int hardware_setup(void)
if (!cpu_has_vmx_vpid())
enable_vpid = 0;

if (!cpu_has_vmx_ept()) {
if (!cpu_has_vmx_ept() ||
!cpu_has_vmx_ept_4levels()) {
enable_ept = 0;
enable_unrestricted_guest = 0;
}
Expand Down

0 comments on commit b80084b

Please sign in to comment.