qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 2/2] Add code to override IRQ 0 to INTI 2
@ 2008-10-27 18:26 Beth Kon
  2008-10-27 19:48 ` Avi Kivity
  0 siblings, 1 reply; 6+ messages in thread
From: Beth Kon @ 2008-10-27 18:26 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

This patch, provided by Anthony Liguori, maps IRQ0 to INTI2.

-- 
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak@us.ibm.com

[-- Attachment #2: apic_int_override.patch --]
[-- Type: text/x-patch, Size: 611 bytes --]

Signed-off-by Beth Kon <bkon@us.ibm.com>

diff --git a/hw/apic.c b/hw/apic.c
index a2915f8..3e34132 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -945,6 +945,13 @@ void ioapic_set_irq(void *opaque, int vector, int level)
 {
     IOAPICState *s = opaque;
 
+    /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
+       to GSI 2.  GSI maps to ioapic 1-1.  This is not
+       the cleanest way of doing it but it should work. */
+
+    if (vector == 0)
+        vector = 2;
+
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
         uint64_t entry = s->ioredtbl[vector];

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-28 14:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 18:26 [Qemu-devel] [PATCH 2/2] Add code to override IRQ 0 to INTI 2 Beth Kon
2008-10-27 19:48 ` Avi Kivity
2008-10-27 19:52   ` Anthony Liguori
2008-10-27 23:02     ` Beth Kon
2008-10-28 12:47     ` Avi Kivity
2008-10-27 20:02   ` Avi Kivity

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).