summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorBandan Das <bsd@redhat.com>2016-07-13 01:18:49 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-14 10:03:14 +0300
commitffb128c89b77b44da18ccf51844a8e750e2c427a (patch)
tree2343268f9b507a99abf34bf20d99b1158488b67e /arch/x86/kvm/vmx.c
parent812f30b234539ccb0139f92dfdbec1e8158cf535 (diff)
downloadlinux-ffb128c89b77b44da18ccf51844a8e750e2c427a.tar.xz
kvm: mmu: don't set the present bit unconditionally
To support execute only mappings on behalf of L1 hypervisors, we need to teach set_spte() to honor all three of L1's XWR bits. As a start, add a new variable "shadow_present_mask" that will be set for non-EPT shadow paging and clear for EPT. Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index e51503063181..a75d09d2a799 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6473,6 +6473,7 @@ static __init int hardware_setup(void)
(enable_ept_ad_bits) ? VMX_EPT_ACCESS_BIT : 0ull,
(enable_ept_ad_bits) ? VMX_EPT_DIRTY_BIT : 0ull,
0ull, VMX_EPT_EXECUTABLE_MASK);
+ 0ull, VMX_EPT_EXECUTABLE_MASK, VMX_EPT_READABLE_MASK);
ept_set_mmio_spte_mask();
kvm_enable_tdp();
} else