]> Git Repo - qemu.git/blobdiff - hw/apic.c
Assign a name to each VLAN client (Mark McLoughlin)
[qemu.git] / hw / apic.c
index a2915f81211a8413d36d2eca2459e635f81f8140..bad137f82674d3764412c2e957f22ce8a647048c 100644 (file)
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
  */
 #include "hw.h"
 #include "pc.h"
@@ -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];
This page took 0.025688 seconds and 4 git commands to generate.