From patchwork Wed Mar 2 14:57:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 85090 X-Patchwork-Delegate: tim.gardner@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id C66E6B70DA for ; Thu, 3 Mar 2011 01:57:28 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PunUL-0008NN-7H; Wed, 02 Mar 2011 14:57:17 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PunUJ-0008NF-Nr for kernel-team@lists.ubuntu.com; Wed, 02 Mar 2011 14:57:15 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PunUJ-0004eK-ME for ; Wed, 02 Mar 2011 14:57:15 +0000 Received: from p5b2e532a.dip.t-dialin.net ([91.46.83.42] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1PunUJ-0007DS-H8 for kernel-team@lists.ubuntu.com; Wed, 02 Mar 2011 14:57:15 +0000 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [Maverick] SRU: Reboot of linux-virtual hangs on EC2 Date: Wed, 2 Mar 2011 15:57:14 +0100 Message-Id: <1299077834-27946-1-git-send-email-stefan.bader@canonical.com> X-Mailer: git-send-email 1.7.0.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: Impact: On reboot or shutdown the current Xen code does try to stop other CPUs. However the IPI communication is disabled already at that point. So issuing a reboot or shutdown from within an instance with multiple vcpus hangs. Fix: Cherry pick of an upstream patch (added around 2.6.37) removes the attempt to stop other CPUs. Testcase: From within an EC2 instance, call "sudo reboot". Instance never comes up again. With the patch applied it does. -Stefan Acked-by: Tim Gardner Acked-by: Brad Figg --- From bf8e8b6da4821b59ea162eec16e05f3a6d8a0f9a Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 29 Nov 2010 14:16:53 -0800 Subject: [PATCH] xen: don't bother to stop other cpus on shutdown/reboot Xen will shoot all the VCPUs when we do a shutdown hypercall, so there's no need to do it manually. In any case it will fail because all the IPI irqs have been pulled down by this point, so the cross-CPU calls will simply hang forever. Until change 76fac077db6b34e2c6383a7b4f3f4f7b7d06d8ce the function calls were not synchronously waited for, so this wasn't apparent. However after that change the calls became synchronous leading to a hang on shutdown on multi-VCPU guests. Signed-off-by: Jeremy Fitzhardinge Cc: Stable Kernel Cc: Alok Kataria BugLink: http://bugs.launchpad.net/bugs/727814 (cherry-picked from commit 31e323cca9d5c8afd372976c35a5d46192f540d1 upstream) Signed-off-by: Stefan Bader --- arch/x86/xen/enlighten.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 6f6cd65..42c2d5f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1022,10 +1022,6 @@ static void xen_reboot(int reason) { struct sched_shutdown r = { .reason = reason }; -#ifdef CONFIG_SMP - stop_other_cpus(); -#endif - if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r)) BUG(); }