]> 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)
commite92008e1e65e6f6982734076566f49566f38559b
treebb60c136f0392fbbd8f222fd2049f265746a7eae
parentde19b797d7c92e1685062af84a4090304668acbd
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