From patchwork Thu May 1 17:36:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 29525 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 78CA320675 for ; Thu, 1 May 2014 17:36:21 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q108sf1253577qgd.7 for ; Thu, 01 May 2014 10:36:21 -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=M5QgOmB8XmSBYt0/StOQXt175Oik8/Os5yWF0TevGxM=; b=RZoGOtV7pi7mRLRebHIYppDHEiRjEAjHRD2aj7OswufK6bycMaull+XiVgY6/+7Qgg 1dW4vbP2W6iJkqdzDbmTI2KQBNEKJVjfv7IplPKF6axSU7jC6GODxrdkAetLeYnUHevt FYYpvLBpg9Xn/yabDBgUNaNr2OB3rtKi1mEtAl0vjlXfkjw1TdYMOqKY4B+7bq2fzW32 hNwoNltmejj7HcNcGu1GPGyyn+r1d9ZMnlSi0uOP2sOtU4LQB4ODTwv8RYGha0EBW0We xdIIMjGxH8OLP853E1mS6feuRhI3VhnWF4fcWXxNV6qgdtYA4TFTL94H+E2ZxACrMKQV z1sw== X-Gm-Message-State: ALoCoQlmE1rrTN8ncBq/Vdin4OX0jD4qg8RY2VdcPWRNQsJeqziqhUNLCaSSVkwz/DS3sa6nwzn5 X-Received: by 10.52.146.45 with SMTP id sz13mr5436555vdb.6.1398965781206; Thu, 01 May 2014 10:36:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.35.210 with SMTP id n76ls1225540qgn.15.gmail; Thu, 01 May 2014 10:36:21 -0700 (PDT) X-Received: by 10.221.67.67 with SMTP id xt3mr679642vcb.41.1398965781073; Thu, 01 May 2014 10:36:21 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id y5si6134941vcq.84.2014.05.01.10.36.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 10:36:21 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so4321131vcb.10 for ; Thu, 01 May 2014 10:36:21 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr9486538vcb.0.1398965780975; Thu, 01 May 2014 10:36:20 -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.221.72 with SMTP id ib8csp41091vcb; Thu, 1 May 2014 10:36:20 -0700 (PDT) X-Received: by 10.194.57.38 with SMTP id f6mr2041336wjq.59.1398965780138; Thu, 01 May 2014 10:36:20 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id wo4si10929197wjb.168.2014.05.01.10.36.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 May 2014 10:36:20 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wfuu9-00020Z-IH; Thu, 01 May 2014 18:36:17 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio Subject: [PATCH] linux-user/signal.c: Set fault address in AArch64 signal info Date: Thu, 1 May 2014 18:36:17 +0100 Message-Id: <1398965777-7694-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: , Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests. Signed-off-by: Peter Maydell --- This would be a candidate for stable except that it depends on the a64 system rework which added exception.vaddress. Hopefully not many guests care about the fault address information... Riku: I'm assuming you'll put this in your tree; I can put it in target-arm if you prefer, but I know you have those other pending signal.c changes... linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 7d6246f..5b8a01f 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1242,8 +1242,7 @@ static int target_setup_sigframe(struct target_rt_sigframe *sf, __put_user(env->pc, &sf->uc.tuc_mcontext.pc); __put_user(pstate_read(env), &sf->uc.tuc_mcontext.pstate); - __put_user(/*current->thread.fault_address*/ 0, - &sf->uc.tuc_mcontext.fault_address); + __put_user(env->exception.vaddress, &sf->uc.tuc_mcontext.fault_address); for (i = 0; i < TARGET_NSIG_WORDS; i++) { __put_user(set->sig[i], &sf->uc.tuc_sigmask.sig[i]);