qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ioapic: Do not set irr for masked edge IRQs


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] ioapic: Do not set irr for masked edge IRQs
Date: Tue, 26 Apr 2011 15:00:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-04-09 13:18, Jan Kiszka wrote:
> From: Jan Kiszka <address@hidden>
> 
> So far we set IRR for edge IRQs even if the pin is masked. If the guest
> later on unmasks and switches the pin to level-triggered mode, irr will
> remain set, causing an IRQ storm. The point is that setting IRR is not
> correct in this case according to the spec, and avoiding this resolves
> the issue.
> 
> Reported-and-tested-by: Isaku Yamahata <address@hidden>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>  hw/ioapic.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ioapic.c b/hw/ioapic.c
> index 569327d..6c26e82 100644
> --- a/hw/ioapic.c
> +++ b/hw/ioapic.c
> @@ -160,8 +160,9 @@ static void ioapic_set_irq(void *opaque, int vector, int 
> level)
>                  s->irr &= ~mask;
>              }
>          } else {
> -            /* edge triggered */
> -            if (level) {
> +            /* According to the 82093AA manual, we must ignore edge requests
> +             * if the input pin is masked. */
> +            if (level && !(entry & IOAPIC_LVT_MASKED)) {
>                  s->irr |= mask;
>                  ioapic_service(s);
>              }

Ping?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

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