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>
This commit is contained in:
@ -283,6 +283,8 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_init);
|
||||
void kvm_vcpu_uninit(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
kvm_mmu_destroy(vcpu);
|
||||
if (vcpu->apic)
|
||||
hrtimer_cancel(&vcpu->apic->timer.dev);
|
||||
kvm_free_apic(vcpu->apic);
|
||||
free_page((unsigned long)vcpu->pio_data);
|
||||
free_page((unsigned long)vcpu->run);
|
||||
|
Reference in New Issue
Block a user