From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D076C433ED for ; Mon, 17 May 2021 18:45:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2ACF160FE9 for ; Mon, 17 May 2021 18:45:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ACF160FE9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liiFR-00021q-81 for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 14:45:49 -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 Content-Transfer-Encoding: 8bit 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+qemu-devel=archiver.kernel.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(-) 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) -- 2.31.1