qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Beth Kon <eak@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] Add code to override IRQ 0 to INTI 2
Date: Mon, 27 Oct 2008 14:26:00 -0400	[thread overview]
Message-ID: <1225131960.7555.79.camel@beth-laptop> (raw)

[-- 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];

             reply	other threads:[~2008-10-27 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 18:26 Beth Kon [this message]
2008-10-27 19:48 ` [Qemu-devel] [PATCH 2/2] Add code to override IRQ 0 to INTI 2 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

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