From: Jan Kiszka <jan.kiszka@siemens.com>
To: Aurelien Jarno <aurelien@aurel32.net>, qemu-devel@nongnu.org
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Subject: Re: [Qemu-devel] [PATCH] ioapic: Do not set irr for masked edge IRQs
Date: Tue, 26 Apr 2011 15:00:30 +0200 [thread overview]
Message-ID: <4DB6C1EE.4090506@siemens.com> (raw)
In-Reply-To: <4DA040A3.2070309@web.de>
On 2011-04-09 13:18, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> 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 <yamahata@valinux.co.jp>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 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
next prev parent reply other threads:[~2011-04-26 13:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 9:05 [Qemu-devel] [PATCH] ioapic: when switches to level trigger mode, interrupts raised repeatedly Isaku Yamahata
2011-04-03 19:53 ` Aurelien Jarno
2011-04-03 23:42 ` Isaku Yamahata
2011-04-04 2:15 ` Isaku Yamahata
2011-04-09 8:38 ` [Qemu-devel] " Jan Kiszka
2011-04-09 11:05 ` Isaku Yamahata
2011-04-09 11:18 ` [Qemu-devel] [PATCH] ioapic: Do not set irr for masked edge IRQs Jan Kiszka
2011-04-09 11:26 ` Jan Kiszka
2011-04-09 11:26 ` [Qemu-devel] " Jan Kiszka
2011-04-09 11:36 ` Jan Kiszka
2011-04-09 11:36 ` [Qemu-devel] " Jan Kiszka
2011-04-09 11:41 ` Isaku Yamahata
2011-04-09 11:41 ` [Qemu-devel] " Isaku Yamahata
2011-04-26 13:00 ` Jan Kiszka [this message]
2011-04-27 18:06 ` [Qemu-devel] " Aurelien Jarno
2011-04-04 5:14 ` [Qemu-devel] [PATCH] ioapic: when switches to level trigger mode, interrupts raised repeatedly Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB6C1EE.4090506@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.