diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-09-03 16:56:58 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:26 +0200 |
commit | 1b9778dae71dc64d3678d766c0f1fbed79c80f9f (patch) | |
tree | 3196bbfe474119a849f35aefddb5e0922205850f /drivers/kvm/irq.c | |
parent | 6e5d865c0b9679b00b5e5f0754c9fc2b6b9894d6 (diff) | |
download | kernel_samsung_smdk4412-1b9778dae71dc64d3678d766c0f1fbed79c80f9f.zip kernel_samsung_smdk4412-1b9778dae71dc64d3678d766c0f1fbed79c80f9f.tar.gz kernel_samsung_smdk4412-1b9778dae71dc64d3678d766c0f1fbed79c80f9f.tar.bz2 |
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 <Eddie.Dong@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/irq.c')
-rw-r--r-- | drivers/kvm/irq.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c index e09cd65..b88e501 100644 --- a/drivers/kvm/irq.c +++ b/drivers/kvm/irq.c @@ -78,3 +78,16 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu) smp_call_function_single(ipi_pcpu, vcpu_kick_intr, vcpu, 0, 0); } +void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu) +{ + kvm_inject_apic_timer_irqs(vcpu); + /* TODO: PIT, RTC etc. */ +} +EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); + +void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec) +{ + kvm_apic_timer_intr_post(vcpu, vec); + /* TODO: PIT, RTC etc. */ +} +EXPORT_SYMBOL_GPL(kvm_timer_intr_post); |