diff options
author | Xudong Hao <xudong.hao@intel.com> | 2012-05-28 11:33:36 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-06-05 13:31:04 (GMT) |
commit | b38f99347871d7fc49e6367395dce0d757f6ab8d (patch) | |
tree | 0538b653957d4c38a9e42ac845efbe293168b3f6 /arch/x86/kvm/vmx.c | |
parent | 83c3a3312235220476d3c207f67bd17be6e17ff9 (diff) | |
download | linux-fsl-qoriq-b38f99347871d7fc49e6367395dce0d757f6ab8d.tar.xz |
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>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 18590e0..d392e54 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; |