OSDN Git Service

KVM: VMX: don't configure EPT identity map for unrestricted guest
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 5 Mar 2018 20:04:37 +0000 (12:04 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Mar 2018 21:01:34 +0000 (22:01 +0100)
commite90008df1678676fb7e51b4cf38ee0f18c38aeba
tree36d89df5d722895625ea60245695f3f418fc48a1
parentf7eaeb0ad815730dc63e8974e6f9f4d93b8ca8bb
KVM: VMX: don't configure EPT identity map for unrestricted guest

An unrestricted guest can run with hardware CR0.PG==0, i.e.
IA32 paging disabled, in which case there is no need to load
the guest's CR3 with identity mapped IA32 page tables since
hardware will effectively ignore CR3.  If unrestricted guest
is enabled, don't configure the identity mapped IA32 page
table and always load the guest's desired CR3.

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