From 1b9778dae71dc64d3678d766c0f1fbed79c80f9f Mon Sep 17 00:00:00 2001 From: Eddie Dong Date: Mon, 3 Sep 2007 16:56:58 +0300 Subject: KVM: Keep track of missed timer irq injections APIC timer IRQ is set every time when a certain period expires at host time, but the guest may be descheduled at that time and thus the irq be overwritten by later fire. This patch keep track of firing irq numbers and decrease only when the IRQ is injected to guest or buffered in APIC. Signed-off-by: Yaozu (Eddie) Dong Signed-off-by: Qing He Signed-off-by: Avi Kivity --- drivers/kvm/irq.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/kvm/irq.h') diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 07035e8279d4..87baf7e69ea2 100644 --- a/drivers/kvm/irq.h +++ b/drivers/kvm/irq.h @@ -154,5 +154,9 @@ int kvm_ioapic_init(struct kvm *kvm); void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level); int kvm_lapic_enabled(struct kvm_vcpu *vcpu); int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu); +void kvm_apic_timer_intr_post(struct kvm_vcpu *vcpu, int vec); +void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec); +void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); +void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); #endif -- cgit v1.2.3