X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fapic.c;h=2ce9225fb49e48af7ea1c70d3be270099cc75d63;hb=ef902a0d61b3b7a9746106b2d8a1d7a2516f4bc7;hp=13fd9910219c05aa3cda3ca55961798deaceb063;hpb=37c18b2c2335a41c68c2f0b779fd2b7d51ab216d;p=palacios.git diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index 13fd991..2ce9225 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -333,7 +333,7 @@ static int apic_do_eoi(struct apic_state * apic) { uchar_t flag = 0x1 << minor_offset; uchar_t * svc_location = apic->int_svc_reg + major_offset; - PrintDebug("Received APIC EOI\n"); + PrintDebug("Received APIC EOI for IRQ %d\n", isr_irq); *svc_location &= ~flag; @@ -979,7 +979,7 @@ static void apic_update_time(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv } tmr_ticks = cpu_cycles >> shift_num; - PrintDebug("Timer Ticks: %p\n", (void *)tmr_ticks); + // PrintDebug("Timer Ticks: %p\n", (void *)tmr_ticks); if (tmr_ticks < apic->tmr_cur_cnt) { apic->tmr_cur_cnt -= tmr_ticks; @@ -991,6 +991,10 @@ static void apic_update_time(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv PrintDebug("Raising APIC Timer interrupt (periodic=%d) (icnt=%d) (div=%d)\n", apic->tmr_vec_tbl.tmr_mode, apic->tmr_init_cnt, shift_num); + if (apic_intr_pending(priv_data)) { + PrintDebug("Overriding pending IRQ %d\n", apic_get_intr_number(priv_data)); + } + if (activate_internal_irq(apic, APIC_TMR_INT) == -1) { PrintError("Could not raise Timer interrupt\n"); } @@ -1045,10 +1049,10 @@ static int apic_init(struct guest_info * vm, void * cfg_data) { struct apic_state * apic = (struct apic_state *)V3_Malloc(sizeof(struct apic_state)); - struct vm_device * dev = v3_allocate_device("APIC", &dev_ops, apic); + struct vm_device * dev = v3_allocate_device("LAPIC", &dev_ops, apic); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "APIC"); + PrintError("Could not attach device %s\n", "LAPIC"); return -1; } @@ -1066,4 +1070,4 @@ static int apic_init(struct guest_info * vm, void * cfg_data) { -device_register("LAPIC", &apic_init) +device_register("LAPIC", apic_init)