diff options
author | Xudong Hao <xudong.hao@intel.com> | 2012-05-22 03:23:15 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-06-05 13:31:05 (GMT) |
commit | 3f6d8c8a478dd1ab2a4944b0d65474df06ecd882 (patch) | |
tree | 87eb511e0ec229ee179fc054b1eba10768cfcab2 /arch/x86/kvm/vmx.c | |
parent | b38f99347871d7fc49e6367395dce0d757f6ab8d (diff) | |
download | linux-fsl-qoriq-3f6d8c8a478dd1ab2a4944b0d65474df06ecd882.tar.xz |
KVM: VMX: Use EPT Access bit in response to memory notifiers
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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d392e54..396148a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -7289,8 +7289,10 @@ static int __init vmx_init(void) vmx_disable_intercept_for_msr(MSR_IA32_SYSENTER_EIP, false); if (enable_ept) { - kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, - VMX_EPT_EXECUTABLE_MASK); + kvm_mmu_set_mask_ptes(0ull, + (enable_ept_ad_bits) ? VMX_EPT_ACCESS_BIT : 0ull, + (enable_ept_ad_bits) ? VMX_EPT_DIRTY_BIT : 0ull, + 0ull, VMX_EPT_EXECUTABLE_MASK); ept_set_mmio_spte_mask(); kvm_enable_tdp(); } else |