]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Adjust shadow paging to work when SMEP=1 and CR0.WP=0
authorAvi Kivity <avi@redhat.com>
Mon, 6 Jun 2011 13:11:54 +0000 (16:11 +0300)
committerAvi Kivity <avi@redhat.com>
Tue, 12 Jul 2011 10:16:26 +0000 (13:16 +0300)
commit2b249da059faf97daf4a711c0995d08f9c3820f6
treebb60c136f0392fbbd8f222fd2049f265746a7eae
parent367fec23075fed8a4372a7a6d9294c5c80af1a1d
KVM: MMU: Adjust shadow paging to work when SMEP=1 and CR0.WP=0

When CR0.WP=0, we sometimes map user pages as kernel pages (to allow
the kernel to write to them).  Unfortunately this also allows the kernel
to fetch from these pages, even if CR4.SMEP is set.

Adjust for this by also setting NX on the spte in these circumstances.

Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/virtual/kvm/mmu.txt
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c