OpenCloudOS-Kernel/arch/x86/kvm
Avi Kivity 08e850c653 KVM: MMU: Reinstate pte prefetch on invlpg
Commit fb341f57 removed the pte prefetch on guest invlpg, citing guest races.
However, the SDM is adamant that prefetch is allowed:

  "The processor may create entries in paging-structure caches for
   translations required for prefetches and for accesses that are a
   result of speculative execution that would never actually occur
   in the executed code path."

And, in fact, there was a race in the prefetch code: we picked up the pte
without the mmu lock held, so an older invlpg could install the pte over
a newer invlpg.

Reinstate the prefetch logic, but this time note whether another invlpg has
executed using a counter.  If a race occured, do not install the pte.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-17 12:15:43 +03:00
..
Kconfig Merge branch 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2010-03-05 13:12:34 -08:00
Makefile KVM: Move assigned device code to own file 2009-12-03 09:32:09 +02:00
emulate.c KVM: x86 emulator mark VMMCALL and LMSW as privileged 2010-05-17 12:15:18 +03:00
i8254.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
i8254.h KVM: Convert i8254/i8259 locks to raw_spinlocks 2010-03-01 12:36:12 -03:00
i8259.c KVM: x86: Kick VCPU outside PIC lock again 2010-04-25 12:39:28 +03:00
irq.c KVM: Remove irq_pending bitmap 2009-06-10 11:48:57 +03:00
irq.h KVM: x86: Kick VCPU outside PIC lock again 2010-04-25 12:39:28 +03:00
kvm_cache_regs.h KVM: Optimize kvm_read_cr[04]_bits() 2010-03-01 12:36:05 -03:00
kvm_timer.h KVM: arch/x86/kvm/kvm_timer.h checkpatch cleanup 2010-05-17 12:14:42 +03:00
lapic.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
lapic.h KVM: Add HYPER-V apic access MSRs 2010-03-01 12:36:00 -03:00
mmu.c KVM: MMU: Reinstate pte prefetch on invlpg 2010-05-17 12:15:43 +03:00
mmu.h KVM: x86 emulator: fix memory access during x86 emulation 2010-03-01 12:36:11 -03:00
mmutrace.h KVM: cleanup kvm trace 2010-05-17 12:15:22 +03:00
paging_tmpl.h KVM: MMU: Reinstate pte prefetch on invlpg 2010-05-17 12:15:43 +03:00
svm.c KVM: Move kvm_exit tracepoint rip reading inside tracepoint 2010-05-17 12:15:25 +03:00
timer.c KVM: Drop useless atomic test from timer function 2009-09-10 08:32:57 +03:00
trace.h KVM: Trace exception injection 2010-05-17 12:15:27 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: x86: Use native_store_idt() instead of kvm_get_idt() 2010-05-17 12:15:28 +03:00
x86.c KVM: Don't follow an atomic operation by a non-atomic one 2010-05-17 12:15:40 +03:00
x86.h KVM: Rename vcpu->shadow_efer to efer 2010-03-01 12:36:04 -03:00