Skip to contentSkip to conversation

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

PATCH In review Xudong Hao 1 participant 1 message May 16, 2012

Subsystems (3)
lore
Share & tools
lore

Xudong Hao

author
#0 lore raw

PATCH 3/4 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.

---
 arch/x86/kvm/vmx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kvm/vmx.c +2 -0
index 811a61e..89151a9 100644
@@ -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