From: Ross Lagerwall Subject: [PATCH] x86: Disable IOAPIC earlier during shutdown Date: Tue, 1 Dec 2015 16:13:13 +0000 Message-ID: <1448986393-16255-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Andrew Cooper , Jan Beulich , Ross Lagerwall List-Id: xen-devel@lists.xenproject.org Commit fc0c3fa2ad5c ("x86/IO-APIC: fix setup of Xen internally used IRQs (take 2)") introduced a regression on some hardware where Xen would hang during shutdown, repeating the following message: APIC error on CPU0: 08(08), Receive accept error This appears to be because an interrupt (in this case from the serial console) destined for a CPU other than the boot CPU is left unhandled so an APIC error on CPU 0 is generated instead. To fix this, disable the IOAPIC before each CPU's local APIC is disabled so that these interrupts are not generated. Signed-off-by: Ross Lagerwall --- xen/arch/x86/smp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index 50ff6c2..5dfdc96 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -299,6 +299,10 @@ void smp_send_stop(void) { int timeout = 10; + local_irq_disable(); + disable_IO_APIC(); + local_irq_enable(); + smp_call_function(stop_this_cpu, NULL, 0); /* Wait 10ms for all other CPUs to go offline. */ @@ -306,7 +310,6 @@ void smp_send_stop(void) mdelay(1); local_irq_disable(); - disable_IO_APIC(); hpet_disable(); __stop_this_cpu(); local_irq_enable(); -- 2.4.3