X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fapic.c;h=508f2215d0abf29f5967725093e6052eeb36d4e3;hb=4fefacc8951fd57a8f5609cf149eb3e5710dee73;hp=5d6da5e1572f3fd77c46be34fc8cea9e962cc4fe;hpb=489fc3f34897a623a8e3a8da9c3c10939b8665d4;p=palacios-OLD.git diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index 5d6da5e..508f221 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -1357,6 +1357,8 @@ static int apic_write(struct guest_info * core, addr_t guest_addr, void * src, u apic->tmr_cur_cnt = op_val; break; case TMR_DIV_CFG_OFFSET: + PrintDebug("apic %u: core %u: setting tmr_div_cfg to 0x%x\n", + apic->lapic_id.val, core->vcpu_id, op_val); apic->tmr_div_cfg.val = op_val; break; @@ -1650,6 +1652,19 @@ static void apic_update_time(struct guest_info * core, } if (apic->tmr_vec_tbl.tmr_mode == APIC_TMR_PERIODIC) { + static unsigned int nexits = 0; + static unsigned int missed_ints = 0; + + nexits++; + missed_ints += tmr_ticks / apic->tmr_init_cnt; + + if ((missed_ints > 0) && (nexits >= 5000)) { + V3_Print("apic %u: core %u: missed %u timer interrupts total in last %u exits.\n", + apic->lapic_id.val, core->vcpu_id, missed_ints, nexits); + missed_ints = 0; + nexits = 0; + } + tmr_ticks = tmr_ticks % apic->tmr_init_cnt; apic->tmr_cur_cnt = apic->tmr_init_cnt - tmr_ticks; }