From patchwork Mon May 17 18:14:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 440202 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1347228jac; Mon, 17 May 2021 11:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydtGcQB5Gz3WdgsEknKxOrHyLxxRY6CCH/ibgafPRBBhA73MyDM5k7Yu2COw34VaEG9szr X-Received: by 2002:a05:6e02:1d88:: with SMTP id h8mr955217ila.66.1621277105674; Mon, 17 May 2021 11:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621277105; cv=none; d=google.com; s=arc-20160816; b=0BkGnGzDOTUw7aYibTxr+OUinSlFCSfQLX/k6FwREQAs9wok3Pp60eRMLxsz+iziq+ gWn21eQEadrqEeUL1KPKqLpIifZKZoEyF+Eh52tn9IR9cpxwgtCt+gvcY0WpeC4nZEci c6khwkFtvH/3AUrSymXVp3KQBaxSi1oG3jIHLrdllyKCWQFB4HTnkux7HZV8I4lxN2hg ouHiE/uxsFhVEDRf9JhMoBaiv0EIUOeWFj1QPpoGsSTa0aq2MfXqQ7ZogGgUamajsX/D v6H998kE8whr4Qr+AFvtIC4vMfaUo3lrqamnag6Y2G+s4vkq6xHRoR2qIfedWpkbDutj 31yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=XkPQmmEwCuu5xUszhkBehQaiYB97BAH08iNylEntFhg=; b=gqnF01dFrcDPEfoGNZVeqTpaffvZG2CUd3d/t2Nf/KGWDDUXs8hB+9V5VSByN+sWum 8q7mEQQAimWgxShiALlsyR+fXV0/As037ft7hQOaDVKJpTZuwwqDGoDXbwuN9bIjk4uE ZJqhuhqBM0dwB6VZQTI4jwrMgVFdxJsWpGg6LZK28vbgcwxh3mPKl5/10eE/YuJi2hH5 IVukpdxesMRqqYUU8NuDseIJ3U+0nRxs7CF4llrm3sZUnfSUCqUt+gTW64nf4RMKrNfn MNSIrxT6KbTEy8nnTXipDuZNUNCkWfNRs+zI5IcZQusTzNcCCdz2MqPiGQ+bxFY44WL7 gvhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w8si18581425jaw.8.2021.05.17.11.45.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 11:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:44622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liiEj-0007n9-1I for patch@linaro.org; Mon, 17 May 2021 14:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lihlp-0006mK-FP for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:20 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:37219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lihlV-0004XJ-8Q for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:13 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MY5XR-1lzVhN3mFp-00YVH2; Mon, 17 May 2021 20:14:49 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 43/59] linux-user/s390x: Add stub sigframe argument for last_break Date: Mon, 17 May 2021 20:14:08 +0200 Message-Id: <20210517181424.8093-44-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517181424.8093-1-laurent@vivier.eu> References: <20210517181424.8093-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:k+YIRMlhgyAXqICz1gseoQpkACOv+tMK2HAlu3aoWAql8gySwA4 NxGsC/64xw/uP80d025Mdmu1zBcMhRSGCNz1jRhoWTnHh+S6Ohl5AvSXRox0r8s5GZJnD86 iVYncor9qJ0EzVdk3RZ1DYAxh4OLSd4m8iuC2DWGS6Ov+eBTUE1P2Nm6pgCYSBbMKAJ921U ZA2mUGWAapuuAioc7MrXA== X-UI-Out-Filterresults: notjunk:1; V03:K0:gnG4jloMGpQ=:XnZJQc13nht2SpBMeJH+bz aEjmQ+ERuaCpP6P8K1E2KUHaYZgn79g8VAmFX4/grMaoaICz8fEMWYGoOm9AWBiyBH1wicUXR QpKBhioaMfc6+yJ9voxxK7l2smqLW3+JSEoNuDSCMEsWz1eHWxStDCB9rGCSh/S/5gr1ddzfU 3I3sj2M47anQBb0TKMW5wFACpWuQ5YsUnwcIL0VmCcSl0RdECm0IWYSVWz8uRLj64JdwoM9Ja Qx5hYxvMRYlM6YjNtnsFnIsLrNUKguFFccjUOzdhvLNMaQcb5GN0r/nFUSgEM/KRJvUrGyMjc py6cdrDi+XnQbpk3iCQ78ENgfLWNmUTc3ZIbOIAEGVLrXxJKQ7xqiZDLLPanplkMO4MECetCp 7Jm5QxOZW/+KeuHmlykj4yWcqK/pjTXctZMQYMFe3FEApRvsxn5nmFXQaJsqv9dbOkBz7qnLK JTx+s/7UpgEQLE5YQxs6Ta8MqfeiOIZOeE2awUMH3tq8K8stbPvS0D3XUbxPlKMMQ5RVhT7eG YgVki65dEZxCrbpXyYuZxs= Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson In order to properly present these arguments, we need to add code to target/s390x to record LowCore parameters for user-only. But in the meantime, at least zero the missing last_break argument, and fixup the comment style in the vicinity. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20210428193408.233706-12-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/s390x/signal.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.31.1 diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index 17f617c65581..bc41b01c5deb 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -167,13 +167,16 @@ void setup_frame(int sig, struct target_sigaction *ka, | (env->psw.mask & ~PSW_MASK_ASC); env->psw.addr = ka->_sa_handler; - env->regs[2] = sig; //map_signal(sig); + env->regs[2] = sig; env->regs[3] = frame_addr += offsetof(typeof(*frame), sc); - /* We forgot to include these in the sigcontext. - To avoid breaking binary compatibility, they are passed as args. */ - env->regs[4] = 0; // FIXME: no clue... current->thread.trap_no; - env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr; + /* + * We forgot to include these in the sigcontext. + * To avoid breaking binary compatibility, they are passed as args. + */ + env->regs[4] = 0; /* FIXME: regs->int_code & 127 */ + env->regs[5] = 0; /* FIXME: regs->int_parm_long */ + env->regs[6] = 0; /* FIXME: current->thread.last_break */ /* Place signal number on stack to allow backtrace from handler. */ __put_user(env->regs[2], &frame->signo); @@ -223,9 +226,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, | (env->psw.mask & ~PSW_MASK_ASC); env->psw.addr = ka->_sa_handler; - env->regs[2] = sig; //map_signal(sig); + env->regs[2] = sig; env->regs[3] = frame_addr + offsetof(typeof(*frame), info); env->regs[4] = frame_addr + offsetof(typeof(*frame), uc); + env->regs[5] = 0; /* FIXME: current->thread.last_break */ } static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)