[xen] fix boot panic "IO-APIC + timer doesn't work!" (#642108)

myoung myoung at fedoraproject.org
Tue Oct 12 21:24:43 UTC 2010


commit 0e39189cb71c5f1fffa6b08266a1d704435b77e3
Author: Michael Young <m.a.young at durham.ac.uk>
Date:   Tue Oct 12 22:23:05 2010 +0100

    fix boot panic "IO-APIC + timer doesn't work!" (#642108)

 xen.8259afix.patch |   73 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 xen.spec           |    8 +++++-
 2 files changed, 80 insertions(+), 1 deletions(-)
---
diff --git a/xen.8259afix.patch b/xen.8259afix.patch
new file mode 100644
index 0000000..be1560e
--- /dev/null
+++ b/xen.8259afix.patch
@@ -0,0 +1,73 @@
+
+# HG changeset patch
+# User Keir Fraser <keir at xen.org>
+# Date 1286028622 -3600
+# Node ID f7d54e1d7044a7d3836b017b0806021b1c17ac7a
+# Parent 7f190f6f1f5a861383fc1a3a877ab63841c00a15
+x86: fix boot failure (regression from pre-4.0 IRQ handling changes)
+
+With the change to index irq_desc[] by IRQ rather than by vector, the
+prior implicit change of the used flow handler when altering the IRQ
+routing path to go through the 8259A didn't work anymore, and hence
+on boards needing the ExtINT delivery workaround failed to boot.
+
+Make make_8259A_irq() a real function again, thus allowing the flow
+handler to be changed there.
+
+Also eliminate the generally superfluous and (at least theoretically)
+dangerous hard coded setting of the flow handler for IRQ0: Earlier
+code should have set this already based on information coming from
+ACPI/MPS, and non-standard systems may e.g. have this IRQ level
+triggered.
+
+Signed-off-by: Jan Beulich <jbeulich at novell.com>
+Tested-by: Markus Schuster <ml at markus.schuster.name>
+xen-unstable changeset:   22222:aed9fd361340
+xen-unstable date:        Sat Oct 02 15:03:15 2010 +0100
+
+--- a/xen/arch/x86/i8259.c	Sat Oct 02 15:10:01 2010 +0100
++++ b/xen/arch/x86/i8259.c	Sat Oct 02 15:10:22 2010 +0100
+@@ -367,6 +367,12 @@ void __devinit init_8259A(int auto_eoi)
+     spin_unlock_irqrestore(&i8259A_lock, flags);
+ }
+ 
++void __init make_8259A_irq(unsigned int irq)
++{
++    io_apic_irqs &= ~(1 << irq);
++    irq_to_desc(irq)->handler = &i8259A_irq_type;
++}
++
+ static struct irqaction __read_mostly cascade = { no_action, "cascade", NULL};
+ 
+ void __init init_IRQ(void)
+--- a/xen/arch/x86/io_apic.c	Sat Oct 02 15:10:01 2010 +0100
++++ b/xen/arch/x86/io_apic.c	Sat Oct 02 15:10:22 2010 +0100
+@@ -37,9 +37,6 @@
+ #include <mach_apic.h>
+ #include <io_ports.h>
+ #include <public/physdev.h>
+-
+-/* Different to Linux: our implementation can be simpler. */
+-#define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
+ 
+ int (*ioapic_renumber_irq)(int ioapic, int irq);
+ atomic_t irq_mis_count;
+@@ -1929,7 +1926,6 @@ static inline void check_timer(void)
+     
+     irq_desc[0].depth  = 0;
+     irq_desc[0].status &= ~IRQ_DISABLED;
+-    irq_desc[0].handler = &ioapic_edge_type;
+ 
+     /*
+      * Subtle, code in do_timer_interrupt() expects an AEOI
+--- a/xen/include/asm-x86/irq.h	Sat Oct 02 15:10:01 2010 +0100
++++ b/xen/include/asm-x86/irq.h	Sat Oct 02 15:10:22 2010 +0100
+@@ -94,6 +94,7 @@ void mask_8259A(void);
+ void mask_8259A(void);
+ void unmask_8259A(void);
+ void init_8259A(int aeoi);
++void make_8259A_irq(unsigned int irq);
+ int i8259A_suspend(void);
+ int i8259A_resume(void);
+ 
+
diff --git a/xen.spec b/xen.spec
index a1ca87e..ea79726 100644
--- a/xen.spec
+++ b/xen.spec
@@ -6,7 +6,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 4.0.1
-Release: 5%{?dist}
+Release: 6%{?dist}
 Group:   Development/Libraries
 License: GPLv2+ and LGPLv2+ and BSD
 URL:     http://xen.org/
@@ -43,6 +43,7 @@ Patch20: localgcc451fix.patch
 Patch21: xen.irq.fixes.patch
 Patch22: xen.xsave.disable.patch
 Patch23: grub-ext4-support.patch
+Patch24: xen.8259afix.patch
 
 Patch100: xen-configure-xend.patch
 
@@ -169,6 +170,7 @@ to build the xen packages.
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
+%patch24 -p1
 
 %patch100 -p1
 
@@ -524,6 +526,10 @@ rm -rf %{buildroot}
 %doc licensedir/*
 
 %changelog
+* Tue Oct 12 2010 Michael Young <m.a.young at durham.ac.uk> - 4.0.1-6
+- add upstream xen patch xen.8259afix.patch to fix boot panic
+  "IO-APIC + timer doesn't work!" (#642108)
+
 * Thu Oct 07 2010 Michael Young <m.a.young at durham.ac.uk> - 4.0.1-5
 - add ext4 support for pvgrub (grub-ext4-support.patch from grub-0.97-66.fc14)
 


More information about the scm-commits mailing list