dect
/
linux-2.6
Archived
13
0
Fork 0

KVM: VMX: Enable EPT A/D bits if supported by turning on relevant bit in EPTP

In EPT page structure entry, Enable EPT A/D bits if processor supported.

Signed-off-by: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Xudong Hao 2012-05-28 19:33:36 +08:00 committed by Avi Kivity
parent 83c3a33122
commit b38f993478
1 changed files with 2 additions and 0 deletions

View File

@ -3039,6 +3039,8 @@ static u64 construct_eptp(unsigned long root_hpa)
/* TODO write the value reading from MSR */
eptp = VMX_EPT_DEFAULT_MT |
VMX_EPT_DEFAULT_GAW << VMX_EPT_GAW_EPTP_SHIFT;
if (enable_ept_ad_bits)
eptp |= VMX_EPT_AD_ENABLE_BIT;
eptp |= (root_hpa & PAGE_MASK);
return eptp;