From patchwork Tue Jun 17 20:44:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 32105 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EFEDA206A0 for ; Tue, 17 Jun 2014 20:46:55 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id db11sf32659229veb.9 for ; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=JiexG1TunMXksJfDdZtLdBVj8kak9zEOiJaYXAzo2mg=; b=Zi1IPzQ33tnmAPcHUOL4a4gl92SppZXzvAzWzp08sUlIbKC/3JhfVInp7VhbpPTzyT LHaxCwjb9PQF12OTbHF1frQ5r1fUJiN54Dposmoa621Ge+CXQNMtKQxVpniIFPv0Ktth Qaxyr/Tqncr7AA8baJ0krh1pdUAcgh+0pTGsmAs+tDzx+LGk7EM4YCSPy798IeIeTdxx PGhps6fT7Fn7jGVR5uXZVEd7qSlS8AFps9n/7N5ybh1eQE6ggGi8ha7xvTkwbKrXe0BC 6T64TMAlXZ1g3AYjANlkMsRkkt/ZbtUQONfbWSIU5eb25UtSST0/4Zyu/ZkS5+VnrH55 WHJg== X-Gm-Message-State: ALoCoQn58fd4Om4+gTLvKQ/zYZt9NCO83EM9d0QQi3B1eOHkKVX1qsMMx66vPBzxZUE7uOZHWcvM X-Received: by 10.236.101.148 with SMTP id b20mr1160853yhg.46.1403038015709; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.227 with SMTP id j90ls261899qgd.47.gmail; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-Received: by 10.52.138.232 with SMTP id qt8mr2822201vdb.44.1403038015564; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id s5si5947376vcu.2.2014.06.17.13.46.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 13:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id jx11so5333897veb.5 for ; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-Received: by 10.220.159.4 with SMTP id h4mr23799527vcx.1.1403038015306; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp236204vcb; Tue, 17 Jun 2014 13:46:55 -0700 (PDT) X-Received: by 10.140.30.70 with SMTP id c64mr37146881qgc.13.1403038014903; Tue, 17 Jun 2014 13:46:54 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k12si2375079qav.129.2014.06.17.13.46.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 13:46:54 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wx0FB-0000vu-A1; Tue, 17 Jun 2014 20:44:37 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wx0F9-0000vp-HA for xen-devel@lists.xenproject.org; Tue, 17 Jun 2014 20:44:35 +0000 Received: from [193.109.254.147:46266] by server-10.bemta-14.messagelabs.com id 7E/F2-04546-2B8A0A35; Tue, 17 Jun 2014 20:44:34 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-7.tower-27.messagelabs.com!1403037873!11902441!1 X-Originating-IP: [74.125.82.181] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25747 invoked from network); 17 Jun 2014 20:44:33 -0000 Received: from mail-we0-f181.google.com (HELO mail-we0-f181.google.com) (74.125.82.181) by server-7.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 20:44:33 -0000 Received: by mail-we0-f181.google.com with SMTP id q59so7887213wes.12 for ; Tue, 17 Jun 2014 13:44:33 -0700 (PDT) X-Received: by 10.194.6.166 with SMTP id c6mr40865262wja.64.1403037873455; Tue, 17 Jun 2014 13:44:33 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id h6sm276600eew.38.2014.06.17.13.44.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2014 13:44:32 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 17 Jun 2014 21:44:28 +0100 Message-Id: <1403037868-18158-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH] xen/arm: Panic when we receive an unexpected trap X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The current implementation of do_unexpected_trap make Xen spin forever on the current physical CPU. This may lead to stall guests VCPU and print unhelpful message (RCU stall...). Usually when Xen receives an unexpected trap, it means that something goes wrong either in the hypervisor or in the CPU. In this case we should directly panic to also stop the other CPUs. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ac3fc70..0abb6ff 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -999,7 +999,7 @@ void do_unexpected_trap(const char *msg, struct cpu_user_regs *regs) { printk("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); show_execution_state(regs); - while(1); + panic("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); } typedef register_t (*arm_hypercall_fn_t)(