> On 2 Apr 2019, at 13:20, Paolo Bonzini <pbonz...@redhat.com> wrote:
>
> On 02/04/19 11:08, Liran Alon wrote:
>>> -
>>> - if (((entry >> IOAPIC_LVT_TRIGGER_MODE_SHIFT) & 1) !=
>>> - IOAPIC_TRIGGER_LEVEL) {
>>> + if (!(entry & IOAPIC_LVT_REMOTE_IRR)) {
>>> continue;
>>> }
>> I think above “if” of checking remote-irr should just be removed.
>> But the rest seems good :)
>>
>
> It seems more logical, as the condition is now the opposite of
> ioapic_set_irq: ioapic_set_irq services the interrupt if remote-irr = 0,
> EOI does it if remote-irr = 1.
>
> Paolo
At this point at ioapic_eoi_broadcast(), you already know you got an EOI for a
level-triggered interrupt.
Therefore, the remote-irr must be already set to 1. Otherwise, this is a bug.
You can assert on this if you wish.
(Note that remote-irr is a read-only property that cannot be overwritten by
guest writing to IOAPIC redirection-table)
-Liran