Skip to content

Commit

Permalink
KVM: VMX: Enable EPT A/D bits if supported by turning on relevant bit…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Xudong Hao authored and Avi Kivity committed Jun 5, 2012
1 parent 83c3a33 commit b38f993
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b38f993

Please sign in to comment.