KVM: VMX: give unrestricted guest full control of CR3
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 5 Mar 2018 20:04:40 +0000 (12:04 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Mar 2018 21:01:36 +0000 (22:01 +0100)
commitb4d185175bc13d238d96998b1dba5ddeb7c69d71
tree433bd4f5e36f64db6f3727e2e7f1d19f2dd4959d
parent5dc1f044a32d52266c5dd44532d4fcf88dbf8ad9
KVM: VMX: give unrestricted guest full control of CR3

Now CR3 is not forced to a host-controlled value when paging is
disabled in an unrestricted guest, CR3 load/store exiting can be
left disabled (for an unrestricted guest).  And because CR0.WP
and CR4.PAE/PSE are also not force to host-controlled values,
all of ept_update_paging_mode_cr0() is no longer needed, i.e.
skip ept_update_paging_mode_cr0() for an unrestricted guest.

Because MOV CR3 no longer exits when paging is disabled for an
unrestricted guest, vmx_decache_cr3() must always read GUEST_CR3
from the VMCS for an unrestricted guest.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c