From: Jason Wessel <jason.wessel@windriver.com>
To: charles@dyfis.net, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Network connections stalling (due to lost interrupts/ticks?)
Date: Fri, 03 Aug 2007 07:18:50 -0500 [thread overview]
Message-ID: <46B31D2A.8020508@windriver.com> (raw)
In-Reply-To: <f8tkgb$q9s$1@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
Charles,
Are you willing to try an experimental patch?
Perhaps you could try the attached patch and post back if it happens to
solve your problem. There is most definitely a problem where qemu can
get hung up indefinitely after an "interrupt storm". I had not ever
submitted it because there is no clean way to do this via the opaque
information that is passed around. It seems wrong to have to make the
ioapic a global. If this does fix the problem perhaps someone will
decide to fix this up in a cleaner fashion via the opaque structures.
Jason.
Charles Duffy wrote:
> Charles Duffy wrote:
>
>> There's a warning on startup that the system can't set a 1024Hz timer,
>> which persists even after I set /proc/sys/dev/rtc/max-user-freq to 1024,
>> and I occasionally get warnings at runtime ("Your time source seems to
>> be instable or some driver is hogging interrupts").
>>
>
> This was happening because my host kernel was compiled with
> CONFIG_HPET_RTC_IRQ=y. I've disabled this option, recompiled and
> rebooted, and it resolved the RTC warning (and apparently, the unstable
> time source messages) -- but my network connections are still stalling.
>
>
>
>
[-- Attachment #2: io_apic_eoi_fix.patch --]
[-- Type: text/x-patch, Size: 1706 bytes --]
Recover from an interupt flood by propagating the end of interrupt state.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
hw/apic.c | 23 +++++++++++++++++++++--
hw/pc.c | 2 +-
2 files changed, 22 insertions(+), 3 deletions(-)
Index: qemu/hw/apic.c
===================================================================
--- qemu.orig/hw/apic.c
+++ qemu/hw/apic.c
@@ -332,6 +332,26 @@ static void apic_set_irq(APICState *s, i
apic_update_irq(s);
}
+struct IOAPICState *ioapic;
+/* XXX Multi IOAPIC support */
+static void apic_propogate_eoi(int vector) {
+ uint32_t irr;
+ int pin;
+
+ if ((vector < 0x10) || (vector > 0xfe))
+ return;
+
+ irr = ioapic->irr;
+ while (irr) {
+ pin = ffs_bit(irr);
+ irr &= ~(1 << pin);
+ if ((ioapic->ioredtbl[pin] & 0xff) == vector) {
+ ioapic->irr &= ~(1 << pin);
+ break;
+ }
+ }
+}
+
static void apic_eoi(APICState *s)
{
int isrv;
@@ -339,8 +359,7 @@ static void apic_eoi(APICState *s)
if (isrv < 0)
return;
reset_bit(s->isr, isrv);
- /* XXX: send the EOI packet to the APIC bus to allow the I/O APIC to
- set the remote IRR bit for level triggered interrupts. */
+ apic_propogate_eoi(isrv);
apic_update_irq(s);
}
Index: qemu/hw/pc.c
===================================================================
--- qemu.orig/hw/pc.c
+++ qemu/hw/pc.c
@@ -36,7 +36,7 @@
static fdctrl_t *floppy_controller;
static RTCState *rtc_state;
static PITState *pit;
-static IOAPICState *ioapic;
+extern IOAPICState *ioapic;
static PCIDevice *i440fx_state;
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
next prev parent reply other threads:[~2007-08-03 12:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 15:56 [Qemu-devel] Network connections stalling (due to lost interrupts/ticks?) Charles Duffy
2007-08-02 22:06 ` [Qemu-devel] " Charles Duffy
2007-08-03 12:18 ` Jason Wessel [this message]
2007-08-03 19:48 ` Charles Duffy
2007-08-06 19:48 ` Charles Duffy
2007-08-03 1:48 ` [Qemu-devel] Re: Network connections stalling Charles Duffy
2007-08-03 2:28 ` Charles Duffy
-- strict thread matches above, loose matches on Subject: below --
2007-08-03 13:48 [Qemu-devel] Re: Network connections stalling (due to lost interrupts/ticks?) n schembr
2007-08-03 15:02 ` Jason Wessel
2007-08-04 2:48 ` Luke -Jr
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=46B31D2A.8020508@windriver.com \
--to=jason.wessel@windriver.com \
--cc=charles@dyfis.net \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).