summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorBandan Das2016-07-13 00:18:49 +0200
committerPaolo Bonzini2016-07-14 09:03:14 +0200
commitffb128c89b77b44da18ccf51844a8e750e2c427a (patch)
tree2343268f9b507a99abf34bf20d99b1158488b67e /arch/x86/kvm/x86.c
parentkvm: mmu: remove is_present_gpte() (diff)
downloadkernel-qcow2-linux-ffb128c89b77b44da18ccf51844a8e750e2c427a.tar.gz
kernel-qcow2-linux-ffb128c89b77b44da18ccf51844a8e750e2c427a.tar.xz
kernel-qcow2-linux-ffb128c89b77b44da18ccf51844a8e750e2c427a.zip
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/x86.c')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bb6e8bfaee3b..0c1fbb8d9d11 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5878,8 +5878,8 @@ int kvm_arch_init(void *opaque)
kvm_x86_ops = ops;
kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
- PT_DIRTY_MASK, PT64_NX_MASK, 0);
-
+ PT_DIRTY_MASK, PT64_NX_MASK, 0,
+ PT_PRESENT_MASK);
kvm_timer_init();
perf_register_guest_info_callbacks(&kvm_guest_cbs);