]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 2 Apr 2015 09:04:05 +0000 (11:04 +0200)
committerJiri Slaby <jslaby@suse.cz>
Wed, 3 Jun 2015 09:33:06 +0000 (11:33 +0200)
commitea294409959184a82c482ca5becd408d9fe7aeb8
treeefcfca0d04720a37901467d5f7e2103eb90be79f
parent1a6d0d9797f71212b371fe7c288d1d28131e9010
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages

commit 898761158be7682082955e3efa4ad24725305fc7 upstream.

smep_andnot_wp is initialized in kvm_init_shadow_mmu and shadow pages
should not be reused for different values of it.  Thus, it has to be
added to the mask in kvm_mmu_pte_write.

Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/x86/kvm/mmu.c