From patchwork Wed Sep 25 12:12:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 20567 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B5C7225E71 for ; Wed, 25 Sep 2013 12:12:54 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf5339027veb.11 for ; Wed, 25 Sep 2013 05:12:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=9+hzpl149+YPM/g53HrDoZMx1phqgnYFEfrOAVeiINo=; b=IYC615KWVwIIYCiETsJYxgD3jrrR3BdNJ6vrr0lYt6cWlimyxowX7y0ikpJbNN8hkP LE7F1p+dp4R+76Yhime302EgvMiXL1b5/9nuzfi5rLzH8A6Gpxcn3cMJthFJ8TEWsCIs H9OFLAjgMkujPeWL+EKrDj9kBslOGEXV/JrgVEyJyf228JYIC1SiIxmhLGft935yHCjw u+jRl3yF6QLXgKKcARp0DHcXBIwds2HHpIvj5U+fRNLWHfjdtVFOLfhfQcpVqUuh199Z L8DSGU4TUWbjNzbgYHU1XRnWZVgLEdJGf5aQFIdBpS3XyBsyMnvGTnP9h/BXW0T0YOhV 68wA== X-Gm-Message-State: ALoCoQkI3g8L+GBFDm00e8eTr3nT4An92By3YHn1cMltps3VSZMDP24xWNBlK9Sszq9ahcd3a0U8 X-Received: by 10.224.96.136 with SMTP id h8mr704205qan.8.1380111173889; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.68 with SMTP id m4ls335682qes.5.gmail; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) X-Received: by 10.58.19.233 with SMTP id i9mr6205vee.36.1380111173758; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id gq6si9687921veb.129.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 05:12:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hu8so4398860vcb.3 for ; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) X-Received: by 10.52.26.69 with SMTP id j5mr6956647vdg.21.1380111173661; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp301486vcz; Wed, 25 Sep 2013 05:12:53 -0700 (PDT) X-Received: by 10.194.3.78 with SMTP id a14mr4970wja.77.1380111172590; Wed, 25 Sep 2013 05:12:52 -0700 (PDT) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by mx.google.com with ESMTPS id hm6si14659858wjb.126.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 05:12:52 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.41 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.41; Received: by mail-wg0-f41.google.com with SMTP id l18so4762122wgh.2 for ; Wed, 25 Sep 2013 05:12:52 -0700 (PDT) X-Received: by 10.194.88.40 with SMTP id bd8mr1286931wjb.56.1380111172051; Wed, 25 Sep 2013 05:12:52 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id l9sm17253319wif.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 05:12:51 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH] xen/arm: Don't dump stack when the VCPU is offline Date: Wed, 25 Sep 2013 13:12:47 +0100 Message-Id: <1380111167-17875-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When a VCPU is not yet online, the registers contain garbagge. This will result to call randomly BUG() in show_guest_stack. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 02c7e28..36fd411 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -614,6 +614,12 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs) void *mapped; unsigned long *stack, addr; + if ( test_bit(_VPF_down, &v->pause_flags) ) + { + printk("No stack trace, VCPU offline\n"); + return; + } + switch ( regs->cpsr & PSR_MODE_MASK ) { case PSR_MODE_USR: