kernel_optimize_test/arch/x86
Paolo Bonzini 5f0b819995 KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0
KVM has special logic to handle pages with pte.u=1 and pte.w=0 when
CR0.WP=1.  These pages' SPTEs flip continuously between two states:
U=1/W=0 (user and supervisor reads allowed, supervisor writes not allowed)
and U=0/W=1 (supervisor reads and writes allowed, user writes not allowed).

When SMEP is in effect, however, U=0 will enable kernel execution of
this page.  To avoid this, KVM also sets NX=1 in the shadow PTE together
with U=0, making the two states U=1/W=0/NX=gpte.NX and U=0/W=1/NX=1.
When guest EFER has the NX bit cleared, the reserved bit check thinks
that the latter state is invalid; teach it that the smep_andnot_wp case
will also use the NX bit of SPTEs.

Cc: stable@vger.kernel.org
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.inel.com>
Fixes: c258b62b26
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-03-10 11:26:10 +01:00
..
boot
configs
crypto
entry x86/entry/compat: Add missing CLAC to entry_INT80_32 2016-02-25 08:31:20 +01:00
ia32
include PCI updates for v4.5: 2016-02-27 12:33:42 -08:00
kernel PM / sleep / x86: Fix crash on graph trace through x86 suspend 2016-03-03 02:28:28 +01:00
kvm KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 2016-03-10 11:26:10 +01:00
lguest
lib
math-emu
mm Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-02-28 07:49:23 -08:00
net
oprofile
pci PCI updates for v4.5: 2016-02-27 12:33:42 -08:00
platform
power
purgatory
ras
realmode
tools
um um: use %lx format specifiers for unsigned longs 2016-03-05 22:21:28 +01:00
video
xen
.gitignore
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
Makefile_32.cpu
Makefile.um