public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] Enable EPT A/D bits if supported by turning on relevant bit in EPTP
@ 2012-05-16  1:10 Xudong Hao
  0 siblings, 0 replies; only message in thread
From: Xudong Hao @ 2012-05-16  1:10 UTC (permalink / raw)
  To: avi; +Cc: kvm, linux-kernel, haitao.shan, xiantao.zhang, xudong.hao

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>
---
 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 811a61e..89151a9 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3005,6 +3005,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;
--
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-16  1:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16  1:10 [PATCH 3/4] Enable EPT A/D bits if supported by turning on relevant bit in EPTP Xudong Hao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox