linux/arch/x86/kvm
Peter Feiner 995f00a619 x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12
EPT A/D was enabled in the vmcs02 EPTP regardless of the vmcs12's EPTP
value. The problem is that enabling A/D changes the behavior of L2's
x86 page table walks as seen by L1. With A/D enabled, x86 page table
walks are always treated as EPT writes.

Commit ae1e2d1082 ("kvm: nVMX: support EPT accessed/dirty bits",
2017-03-30) tried to work around this problem by clearing the write
bit in the exit qualification for EPT violations triggered by page
walks.  However, that fixup introduced the opposite bug: page-table walks
that actually set x86 A/D bits were *missing* the write bit in the exit
qualification.

This patch fixes the problem by disabling EPT A/D in the shadow MMU
when EPT A/D is disabled in vmcs12's EPTP.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-07-03 15:12:44 +02:00
..
cpuid.c KVM: x86: virtualize cpuid faulting 2017-04-21 12:50:06 +02:00
cpuid.h kvm: x86: Guest BNDCFGS requires guest MPX support 2017-06-07 16:28:15 +02:00
debugfs.c kvm: x86: export TSC information to user-space 2016-09-16 16:57:48 +02:00
emulate.c KVM: x86: remove ignored type attribute 2017-06-30 12:45:55 +02:00
hyperv.c sched/headers: Prepare to move cputime functionality from <linux/sched.h> into <linux/sched/cputime.h> 2017-03-02 08:42:39 +01:00
hyperv.h KVM: x86: Hyper-V tsc page setup 2016-09-20 09:26:20 +02:00
i8254.c KVM: x86: Handle the kthread worker using the new API 2016-12-08 15:31:11 +01:00
i8254.h KVM: x86: Handle the kthread worker using the new API 2016-12-08 15:31:11 +01:00
i8259.c KVM: x86: simplify pic_ioport_read() 2017-04-12 20:17:15 +02:00
ioapic.c KVM: x86: rename kvm_vcpu_request_scan_ioapic() 2017-04-12 20:17:14 +02:00
ioapic.h KVM: x86: convert kvm_(set|get)_ioapic() into void 2017-04-12 20:17:14 +02:00
irq.c KVM: x86: get rid of pic_irqchip() 2017-04-12 20:17:13 +02: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: drop legacy device assignment 2017-04-07 16:49:00 +02:00
kvm_cache_regs.h KVM, pkeys: add pkeys support for permission_fault 2016-03-22 16:23:37 +01:00
lapic.c KVM: LAPIC: Fix lapic timer injection delay 2017-06-29 18:21:13 +02:00
lapic.h KVM: lapic: reorganize restart_apic_timer 2017-06-29 18:18:52 +02:00
Makefile KVM: x86: drop legacy device assignment 2017-04-07 16:49:00 +02:00
mmu.c x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12 2017-07-03 15:12:44 +02:00
mmu.h x86: kvm: mmu: make spte mmio mask more explicit 2017-07-03 10:43:31 +02:00
mmu_audit.c kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
mmutrace.h kvm: x86: mmu: allow A/D bits to be disabled in an mmu 2017-07-03 11:19:54 +02:00
mtrr.c KVM: MTRR: fix kvm_mtrr_check_gfn_range_consistency page fault 2016-07-05 16:14:43 +02:00
page_track.c mm: introduce kv[mz]alloc helpers 2017-05-08 17:15:12 -07:00
paging_tmpl.h KVM: nVMX: fix EPT permissions as reported in exit qualification 2017-05-15 18:22:40 +02: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 KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch 2015-06-23 14:12:14 +02:00
pmu_amd.c perf/x86/amd: Make HW_CACHE_REFERENCES and HW_CACHE_MISSES measure L2 2016-09-16 16:19:49 +02: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: SVM: suppress unnecessary NMI singlestep on GIF=0 and nested exit 2017-06-27 16:35:43 +02:00
trace.h KVM: x86: support using the vmx preemption timer for tsc deadline timer 2016-06-16 10:07:48 +02:00
tss.h
vmx.c x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12 2017-07-03 15:12:44 +02:00
x86.c x86: kvm: mmu: make spte mmio mask more explicit 2017-07-03 10:43:31 +02:00
x86.h kvm: better MWAIT emulation for guests 2017-04-21 12:50:28 +02:00