linux/arch/x86/kvm
Marcelo Tosatti 3cf57fed21 KVM: PIT: fix injection logic and count
The PIT injection logic is problematic under the following cases:

1) If there is a higher priority vector to be delivered by the time
kvm_pit_timer_intr_post is invoked ps->inject_pending won't be set.
This opens the possibility for missing many PIT event injections (say if
guest executes hlt at this point).

2) ps->inject_pending is racy with more than two vcpus. Since there's no locking
around read/dec of pt->pending, two vcpu's can inject two interrupts for a single
pt->pending count.

Fix 1 by using an irq ack notifier: only reinject when the previous irq
has been acked. Fix 2 with appropriate locking around manipulation of
pending count and irq_ack by the injection / ack paths.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-10-15 10:15:17 +02:00
..
Kconfig mmu-notifiers: core 2008-07-28 16:30:21 -07:00
Makefile KVM: Add coalesced MMIO support (x86 part) 2008-07-20 12:42:31 +03:00
i8254.c KVM: PIT: fix injection logic and count 2008-10-15 10:15:17 +02:00
i8254.h KVM: PIT: fix injection logic and count 2008-10-15 10:15:17 +02:00
i8259.c KVM: irq ack notification 2008-10-15 10:15:16 +02:00
irq.c KVM: PIT: fix injection logic and count 2008-10-15 10:15:17 +02:00
irq.h KVM: irq ack notification 2008-10-15 10:15:16 +02:00
kvm_cache_regs.h KVM: x86: accessors for guest registers 2008-10-15 10:13:57 +02:00
kvm_svm.h
lapic.c KVM: irq ack notification 2008-10-15 10:15:16 +02:00
lapic.h
mmu.c KVM: MMU: Simplify kvm_mmu_zap_page() 2008-10-15 10:15:12 +02:00
mmu.h KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
paging_tmpl.h KVM: MMU: Fix torn shadow pte 2008-08-25 17:24:27 +03:00
svm.c KVM: SVM: Unify register save/restore across 32 and 64 bit hosts 2008-10-15 10:15:14 +02:00
svm.h
tss.h
vmx.c KVM: VMX: Avoid vmwrite(HOST_RSP) when possible 2008-10-15 10:15:15 +02:00
vmx.h KVM: VMX: Rename misnamed msr bits 2008-10-15 10:13:57 +02:00
x86.c KVM: Ignore DEBUGCTL MSRs with no effect 2008-10-15 10:15:15 +02:00
x86.h KVM: Add a pending interrupt queue 2008-10-15 10:15:13 +02:00
x86_emulate.c KVM: x86: accessors for guest registers 2008-10-15 10:13:57 +02:00