summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXudong Hao <xudong.hao@intel.com>2012-05-28 19:33:36 +0800
committerAvi Kivity <avi@redhat.com>2012-06-05 16:31:04 +0300
commitb38f99347871d7fc49e6367395dce0d757f6ab8d (patch)
tree0538b653957d4c38a9e42ac845efbe293168b3f6
parent83c3a3312235220476d3c207f67bd17be6e17ff9 (diff)
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>
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 18590e003bd..d392e5427ca 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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;