qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] ioapic: allow buggy guests mishandling level


From: Liran Alon
Subject: Re: [Qemu-devel] [PATCH v2] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress
Date: Tue, 2 Apr 2019 14:36:23 +0300


> On 2 Apr 2019, at 13:20, Paolo Bonzini <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]