X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fapic.c;h=73bee3114efaa4081bff9a2ea189e93e45b98b76;hb=9f049c5f96785b6aa3e284a244235712c4047c1b;hp=db68669c47c27479066571cf969e41dd74e87aa5;hpb=0c31bb41ac41d04a891a6eeff5bae398fa89b419;p=palacios.git diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index db68669..73bee31 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -917,6 +917,8 @@ static int apic_intr_pending(struct guest_info * info, void * private_data) { int req_irq = get_highest_irr(apic); int svc_irq = get_highest_isr(apic); + PrintDebug("apic %u: core %u: req_irq=%d, svc_irq=%d\n",apic->lapic_id.val,info->cpu_id,req_irq,svc_irq); + if ((req_irq >= 0) && (req_irq > svc_irq)) { return 1; @@ -956,8 +958,16 @@ static int apic_begin_irq(struct guest_info * info, void * private_data, int irq uchar_t * svc_location = apic->int_svc_reg + major_offset; uchar_t flag = 0x01 << minor_offset; - *svc_location |= flag; - *req_location &= ~flag; + if (*req_location & flag) { + // we will only pay attention to a begin irq if we + // know that we initiated it! + *svc_location |= flag; + *req_location &= ~flag; + } else { + // do nothing... + PrintDebug("apic %u: core %u: begin irq for %d ignored since I don't own it\n", + apic->lapic_id.val,info->cpu_id,irq); + }