X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fapic.c;h=5aa5e13ae6484b3002f6e3c71bd0422806914a77;hp=f0a9d049dbe84dfbc4e6e5ebff1f49df13760ea9;hb=8a3dbb70c29175bad79764a0b2f3961b98138bb2;hpb=0e26b3738daf436ba2d9a088ba620a3583d40de3 diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index f0a9d04..5aa5e13 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -1655,12 +1655,14 @@ static void apic_update_time(struct guest_info * core, if (tmr_ticks < apic->tmr_cur_cnt) { apic->tmr_cur_cnt -= tmr_ticks; - if (apic->missed_ints) { +#ifdef V3_CONFIG_APIC_ENQUEUE_MISSED_TMR_IRQS + if (apic->missed_ints && !apic_intr_pending(core, priv_data)) { PrintDebug("apic %u: core %u: Injecting queued APIC timer interrupt.\n", apic->lapic_id.val, core->vcpu_id); apic_inject_timer_intr(core, priv_data); apic->missed_ints--; } +#endif /* CONFIG_APIC_ENQUEUE_MISSED_TMR_IRQS */ } else { tmr_ticks -= apic->tmr_cur_cnt; apic->tmr_cur_cnt = 0; @@ -1669,12 +1671,9 @@ static void apic_update_time(struct guest_info * core, if (apic->tmr_vec_tbl.tmr_mode == APIC_TMR_PERIODIC) { int queued_ints = tmr_ticks / apic->tmr_init_cnt; - if (queued_ints) - PrintDebug("apic %u: core %u: Deferring %u APIC timer interrupts.\n", - apic->lapic_id.val, core->vcpu_id, queued_ints); - apic->missed_ints += queued_ints; tmr_ticks = tmr_ticks % apic->tmr_init_cnt; apic->tmr_cur_cnt = apic->tmr_init_cnt - tmr_ticks; + apic->missed_ints += queued_ints; } }