From: roblabla <1834051@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1834051] Re: IRQ2 ignored under KVM when using IOAPIC
Date: Mon, 24 Jun 2019 15:56:53 -0000 [thread overview]
Message-ID: <156139181396.18147.18062095652882733100.launchpad@gac.canonical.com> (raw)
In-Reply-To: 156138866047.31005.4592891012762616724.malonedeb@chaenomeles.canonical.com
** Description changed:
When using KVM, and an OS that supports the IOAPIC, interrupts mapped on
IRQ2 (for instance, routing an HPET timer on interrupt 2) will cause the
interrupts to never be delivered. This is because QEmu, when setting up
the KVM interrupt routes, will not set one up for IRQ2[0]. When running
without KVM, IRQ2 is identity-mapped to GSI2.
My understanding is that IRQs should be identity mapped to their
equivalent GSI unless a redirection entry is present in the MADT. This
is supported by ACPI 6.2 spec[1], 5.2.12.5 Interrupt Source Override
Structure, which claims: "It is assumed that the ISA interrupts will be
identity-mapped into the first I/O APIC sources.".
I stumbled across this while working on my own custom OS, got very
confused why the HPET wasn't triggering any interruption - and even more
confused why the behavior only happened in KVM and not in non-KVM.
- EDIT: Interestingly, the HPET only supports IRQ2 under qemu, which,
- combined with this bug, makes it completely unusable.
+ EDIT: Interestingly, the HPET only supports IRQ2 when using the default
+ PIIX chipset, which, combined with this bug, makes it completely
+ unusable.
[0]:
https://github.com/qemu/qemu/blob/37560c259d7a0d6aceb96e9d6903ee002f4e5e0c/hw/i386/kvm/ioapic.c#L40
[1]: https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1834051
Title:
IRQ2 ignored under KVM when using IOAPIC
Status in QEMU:
New
Bug description:
When using KVM, and an OS that supports the IOAPIC, interrupts mapped
on IRQ2 (for instance, routing an HPET timer on interrupt 2) will
cause the interrupts to never be delivered. This is because QEmu, when
setting up the KVM interrupt routes, will not set one up for IRQ2[0].
When running without KVM, IRQ2 is identity-mapped to GSI2.
My understanding is that IRQs should be identity mapped to their
equivalent GSI unless a redirection entry is present in the MADT. This
is supported by ACPI 6.2 spec[1], 5.2.12.5 Interrupt Source Override
Structure, which claims: "It is assumed that the ISA interrupts will
be identity-mapped into the first I/O APIC sources.".
I stumbled across this while working on my own custom OS, got very
confused why the HPET wasn't triggering any interruption - and even
more confused why the behavior only happened in KVM and not in non-
KVM.
EDIT: Interestingly, the HPET only supports IRQ2 when using the
default PIIX chipset, which, combined with this bug, makes it
completely unusable.
[0]:
https://github.com/qemu/qemu/blob/37560c259d7a0d6aceb96e9d6903ee002f4e5e0c/hw/i386/kvm/ioapic.c#L40
[1]: https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1834051/+subscriptions
next prev parent reply other threads:[~2019-06-24 16:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 15:04 [Qemu-devel] [Bug 1834051] [NEW] IRQ2 ignored under KVM when using IOAPIC roblabla
2019-06-24 15:20 ` [Qemu-devel] [Bug 1834051] " roblabla
2019-06-24 15:48 ` roblabla
2019-06-24 15:56 ` roblabla [this message]
2021-04-22 6:54 ` Thomas Huth
2021-06-22 4:18 ` Launchpad Bug Tracker
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=156139181396.18147.18062095652882733100.launchpad@gac.canonical.com \
--to=1834051@bugs.launchpad.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).