Depending on the IRQ we need to
- not look at the PIC at all is this is the LAPIC timer (in that case
we're dealing with a vector number rather than an IRQ one),
- not look at the PIC for any non-legacy interrupt,
- look at the correct PIC for the IRQ (which will always be PIC 2 for
the RTC, and possibly also for HPET).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com> (FreeBSD guest)
Reviewed-by: Tim Deegan <tim@xen.org>
* IRR is returned and used to set eoi_exit_bitmap for virtual
* interrupt delivery case. Otherwise return -1 to do nothing.
*/
- if ( vlapic_accept_pic_intr(v) &&
- (&v->domain->arch.hvm_domain)->vpic[0].int_output )
+ if ( !is_lapic &&
+ platform_legacy_irq(irq) && vlapic_accept_pic_intr(v) &&
+ (&v->domain->arch.hvm_domain)->vpic[irq >> 3].int_output )
return -1;
else
return pt_irq_vector(earliest_pt, hvm_intsrc_lapic);