From: Ed Swierk <eswierk@aristanetworks.com>
To: Sebastian Herbszt <herbszt@gmx.de>
Cc: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Fix timer interrupt routing for non-ACPI guest
Date: Sun, 12 Apr 2009 14:46:52 -0700 [thread overview]
Message-ID: <9ae48b020904121446k70ca257v30a17754f374ce5a@mail.gmail.com> (raw)
In-Reply-To: <6F64D9258BE74551983017A7F9B94472@FSCPC>
On Sun, Apr 12, 2009 at 6:51 AM, Sebastian Herbszt <herbszt@gmx.de> wrote:
> Ed Swierk wrote:
>>
>> Qemu 0.10.2 is unable to boot a non-ACPI kernel due to a BIOS bug:
>>
>> ENABLING IO-APIC IRQs ..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
>> ..MP-BIOS bug: 8254 timer not connected to IO-APIC ...trying to set up timer
>> (IRQ0) through the 8259A ... ..... (found apic 0 pin 0) ... ....... failed.
>> ...trying to set up timer as Virtual Wire IRQ...
>
> I tried Linux 2.6.27.7 and it seems to hang after
> "...trying to set up timer as Virtual Wire IRQ...".
>
> On 2.6.25.5 it managed to use Virtual Wire mode:
>
> ..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
> ..MP-BIOS bug: 8254 timer not connected to IO-APIC
> ...trying to set up timer (IRQ0) through the 8259A ... failed.
> ...trying to set up timer as Virtual Wire IRQ... works.
> testing the IO APIC.......................
> .................................... done.
Hmm, I guess the kernel got more picky since 2.6.25.
>> The interrupt routing table in the MPTABLE needs to route the timer
>> interrupt (IRQ 0) to IOAPIC pin 2.
>
> Do you refer here to "5.3 Assigning of I/O Interrupts to the APIC I/O Unit"
> from MultiProcessor Specification 1.4 or some other documentation?
I confess I haven't checked actual documentation; instead I've
referred to code from Coreboot that seems to work. For example the
bus_isa interrupts at
http://tracker.coreboot.org/trac/coreboot/browser/trunk/coreboot-v2/src/mainboard/msi/ms9185/mptable.c
.
>> A similar bug was recently fixed in the ACPI table code.
>
> Can you point me to the patch?
See the change to acpi_bios_init() in
http://git.kernel.org/?p=virt/bochs/bochs.git;a=commitdiff;h=b494def0e417778ed814692ce1db06cca3a757cf
.
>> This patch fixes the problem for non-ACPI guests.
>
> Linux displays the following without any patch:
>
> Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 1, APIC INT 00
> Int: type 0, pol 0, trig 0, bus 00, IRQ 01, APIC ID 1, APIC INT 01
> Int: type 0, pol 0, trig 0, bus 00, IRQ 02, APIC ID 1, APIC INT 02
> Int: type 0, pol 0, trig 0, bus 00, IRQ 03, APIC ID 1, APIC INT 03
> ...
> ..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
>
> [older Linux output]
> IRQ to pin mappings:
> IRQ0 -> 0:0
> IRQ1 -> 0:1
> IRQ2 -> 0:2
> IRQ3 -> 0:3
>
> With your patch it's:
>
> Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 1, APIC INT 00
> Int: type 0, pol 0, trig 0, bus 00, IRQ 01, APIC ID 1, APIC INT 01
> Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 1, APIC INT 02
> Int: type 0, pol 0, trig 0, bus 00, IRQ 03, APIC ID 1, APIC INT 03
> ...
> ..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
>
> [older Linux output]
> IRQ to pin mappings:
> IRQ0 -> 0:0-> 0:2
> IRQ1 -> 0:1
> IRQ3 -> 0:3
>
> Is this mapping correct or should it rather be the following?
>
> ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
>
> IRQ0 -> 0:2
> IRQ1 -> 0:1
> IRQ3 -> 0:3
I suspect the latter is correct but I don't know that it really makes
a difference, at least to Linux.
--Ed
next prev parent reply other threads:[~2009-04-12 21:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 3:08 [Qemu-devel] [PATCH] Fix timer interrupt routing for non-ACPI guest Ed Swierk
2009-04-12 13:51 ` [Qemu-devel] " Sebastian Herbszt
2009-04-12 21:46 ` Ed Swierk [this message]
2009-04-13 15:49 ` Sebastian Herbszt
2009-04-13 16:21 ` [Qemu-devel] " Beth Kon
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=9ae48b020904121446k70ca257v30a17754f374ce5a@mail.gmail.com \
--to=eswierk@aristanetworks.com \
--cc=bochs-developers@lists.sourceforge.net \
--cc=herbszt@gmx.de \
--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).