]> 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)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 9 Jun 2015 17:43:47 +0000 (13:43 -0400)
commitb62b720974390bbac424713ad7e2997e0b49633f
treededb87270f3d87963c6c3472adcc07a89dc358e1
parent3d93f1105707743a2f43d66d75db9a5b63aa79ad
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages

[ Upstream commit 898761158be7682082955e3efa4ad24725305fc7 ]

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>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/x86/kvm/mmu.c