KVM: MMU: Use different shadows when EFER.NXE changes
commit9645bb56b31a1b70ab9e470387b5264cafc04aa9
authorAvi Kivity <avi@redhat.com>
Tue, 31 Mar 2009 08:31:54 +0000 (31 11:31 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:35 +0000 (10 11:48 +0300)
tree4055788c6c7ed181d4e96b3eff94ad30be6e10c6
parent82725b20e22fb85377f61a16f6d0d5cfc28b45d3
KVM: MMU: Use different shadows when EFER.NXE changes

A pte that is shadowed when the guest EFER.NXE=1 is not valid when
EFER.NXE=0; if bit 63 is set, the pte should cause a fault, and since the
shadow EFER always has NX enabled, this won't happen.

Fix by using a different shadow page table for different EFER.NXE bits.  This
allows vcpus to run correctly with different values of EFER.NXE, and for
transitions on this bit to be handled correctly without requiring a full
flush.

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