From: Beth Kon <eak@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Add Interrupt Source Override Structure to BIOS
Date: Mon, 27 Oct 2008 14:30:47 -0400 [thread overview]
Message-ID: <1225132247.7555.81.camel@beth-laptop> (raw)
In-Reply-To: <1225131623.7555.72.camel@beth-laptop>
On Mon, 2008-10-27 at 14:20 -0400, Beth Kon wrote:
> Looking into a problem with getting the HPET to work for both Windows
> and Linux revealed what appears to be a problem with QEMU's interrupt
> generation.
>
> Since QEMU supports both APIC and dual 8259 mode (as indicated by bit 0
> of the MADT flags - PCAT COMPAT), the BIOS should include the Interrupt
> Source Override structure to inform the OS that IRQ0 is mapped to
> interrupt 2 in APIC mode, which is the standard scheme for the PIT.
>
> What must be happening is that Linux is abiding by what the BIOS says
> and expecting INTI0 from the APIC (since there is no Interrupt Source
> Override). Windows must be ignoring the Interrupt Source Override
> information and just expecting to see the timer interrupt on INTI2. So
> the HPET had to raise both 0 and 2 to keep them both happy.
>
> Patch 1 adds the Interrupt Source Override to BIOS, and Patch 2 modifies
> ioapic_set_irq to change vector 0 to 2.
>
> Making this change allowed Windows and Linux to both work with HPET code
> that just raised IRQ0.
>
> That said, I don't understand why the PIT was working with the code as
> it was in the case of Windows, unless in that case windows was honoring
> the Interrupt Source Override (or the lack of one, I should say). I'm
> not sure these patches are the right solution for all cases, but they
> work for the HPET. I should add that KVM does have an Interrupt Source
> Override structure in their BIOS but they do not remap 0 to 2, so maybe
> I'm missing something here. Comments appreciated.
>
Forgot ....
Signed-off-by Beth Kon <bkon@us.ibm.com>
--
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak@us.ibm.com
prev parent reply other threads:[~2008-10-27 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 18:20 [Qemu-devel] [PATCH 1/2] Add Interrupt Source Override Structure to BIOS Beth Kon
2008-10-27 18:30 ` Beth Kon [this message]
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=1225132247.7555.81.camel@beth-laptop \
--to=eak@us.ibm.com \
--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).