linux-stable/arch/x86/kvm
Sean Christopherson 5dc1f044a3 KVM: VMX: don't force CR4.PAE/PSE for unrestricted guest
CR4.PAE - Unrestricted guest can only be enabled when EPT is
enabled, and vmx_set_cr4() clears hardware CR0.PAE based on
the guest's CR4.PAE, i.e. CR4.PAE always follows the guest's
value when unrestricted guest is enabled.

CR4.PSE - Unrestricted guest no longer uses the identity mapped
IA32 page tables since CR0.PG can be cleared in hardware, thus
there is no need to set CR4.PSE when paging is disabled in the
guest (and EPT is enabled).

Define KVM_VM_CR4_ALWAYS_ON_UNRESTRICTED_GUEST (to X86_CR4_VMXE)
and use it in lieu of KVM_*MODE_VM_CR4_ALWAYS_ON when unrestricted
guest is enabled, which removes the forcing of CR4.PAE.

Skip the manipulation of CR4.PAE/PSE for EPT when unrestricted
guest is enabled, as CR4.PAE isn't forced and so doesn't need to
be manually cleared, and CR4.PSE does not need to be set when
paging is disabled since the identity mapped IA32 page tables
are not used.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2018-03-16 22:01:35 +01:00
..
cpuid.c KVM: x86: Add support for AMD Core Perf Extension in guest 2018-03-16 22:01:28 +01:00
cpuid.h KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX 2018-02-03 23:06:51 +01:00
debugfs.c kvm: x86: export TSC information to user-space 2016-09-16 16:57:48 +02:00
emulate.c Merge branch 'x86/hyperv' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-02-01 15:04:17 +01:00
hyperv.c x86/kvm/hyper-v: inject #GP only when invalid SINTx vector is unmasked 2018-03-16 22:01:33 +01:00
hyperv.h kvm: x86: hyperv: guest->host event signaling via eventfd 2018-03-06 18:40:36 +01:00
i8254.c KVM: x86: take slots_lock in kvm_free_pit 2017-07-12 22:38:26 +02:00
i8254.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i8259.c KVM: x86: simplify pic_ioport_read() 2017-04-12 20:17:15 +02:00
ioapic.c KVM: x86: ioapic: Preserve read-only values in the redirection table 2017-11-17 13:20:21 +01:00
ioapic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.c KVM: nVMX: Fix injection to L2 when L1 don't intercept external-interrupts 2018-01-16 16:40:09 +01:00
irq.h KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING 2017-05-02 14:45:45 +02:00
irq_comm.c KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING 2017-05-02 14:45:45 +02:00
Kconfig KVM: x86: prefer "depends on" to "select" for SEV 2018-01-16 16:38:32 +01:00
kvm_cache_regs.h KVM: x86: Make enum conversion explicit in kvm_pdptr_read() 2018-03-16 22:01:30 +01:00
lapic.c KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use 2018-03-16 22:01:29 +01:00
lapic.h KVM: x86: Change __kvm_apic_update_irr() to also return if max IRR updated 2018-01-16 16:40:09 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu.c s390: 2018-02-26 09:28:35 -08:00
mmu.h First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08:00
mmu_audit.c KVM: x86: MMU: make array audit_point_name static 2017-12-14 09:26:41 +01:00
mmutrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtrr.c KVM: x86: generalize guest_cpuid_has_ helpers 2017-08-07 16:11:50 +02:00
page_track.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
paging_tmpl.h KVM: x86: Update the exit_qualification access bits while walking an address 2018-03-16 22:01:30 +01:00
pmu.c KVM: x86: never specify a sample period for virtualized in_tx_cp counters 2017-03-01 14:19:46 +01:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmu_amd.c KVM: x86: Add support for AMD Core Perf Extension in guest 2018-03-16 22:01:28 +01:00
pmu_intel.c KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh() 2017-05-19 19:59:27 +02:00
svm.c KVM fixes for v4.16-rc4 2018-03-02 19:40:43 -08:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmx.c KVM: VMX: don't force CR4.PAE/PSE for unrestricted guest 2018-03-16 22:01:35 +01:00
vmx_shadow_fields.h KVM: nVMX: track dirty state of non-shadowed VMCS fields 2018-01-16 16:50:13 +01:00
x86.c x86/kvm/hyper-v: add reenlightenment MSRs support 2018-03-16 22:01:31 +01:00
x86.h KVM: nVMX: Fix bug of injecting L2 exception into L1 2018-01-16 16:40:09 +01:00