From patchwork Fri Jan 7 21:32:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530502 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp720676imp; Fri, 7 Jan 2022 13:42:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1HU/9PGOKG+CWetWXj7LXEK8bSk6VfPTvw6yqfVqtyUr9T2r4wR8ejBl5OoYc9KYv2iyM X-Received: by 2002:a05:6902:721:: with SMTP id l1mr55723272ybt.64.1641591740911; Fri, 07 Jan 2022 13:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641591740; cv=none; d=google.com; s=arc-20160816; b=nJv15Q6LdKR96ShYbTA7G6dd3m1JPhBrysZEffK77zvGmz/lfd21EACgJYjByMULW9 UyEGswfBfZTnUkfxRTzk/hBLAQpB2npyqj1YzGlWQgLeqSw6vlao5OS4h/20V1sbVJnE iv/eE9ldP6xxHUI0e2cMY2O9m+ePN8cX+s+dVKJlORbajf0Cpg6K3CaAYRZY/uBSLQsB wMAEtj3YyVBZGseAxbRGUnMufiOF81qgu67pNJNZG6jOILs8P3Yrtxy2/l/jWDPpiaeS 0sKp/SgOfIp5KwON6EcVSO7bH90EQMmhjxleAXrqo8VKsQxOVlAZFqbgH1dCt/MUDsDa q5sw== 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 :dkim-signature; bh=Ca53GjQ9RuhRXPL4DhHW76qKdYdJSEjrupmNQVoTgGw=; b=LyomjOCpgxj2EqkYaoMD2mnX3rMdFXIWtb4tBTF8y9OWrJCBzO7u3UxXqlRQUydrdy gr0Hd1EF6jaLkT0MrV3HOHBNlSZRhAPeCxunySf9fsrWFmyyjWmOwF8LVLp+6+32Sxit pDp0x7E+IRY+bw+VRUMpt/HO+OEGB4U9c8ieWxsrMht6Gw4zDfLQz6EtItpjzQTSCkVz gYQIb3/K8WHo6aFDtGi5cqsuWZ8ceo39B6vfZSoCJGGI5HyDKGG0Cl+grGNDjHvIynOu qyt0qgNztbDEdvNeBJEFt6eo9Hvul8WUfodPP4rZnEBTFDj+kgj62bUAWpmQBzA0xqtk p4QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bvalEP/l"; 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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q1si4720788ybp.228.2022.01.07.13.42.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jan 2022 13:42:20 -0800 (PST) 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; dkim=fail header.i=@linaro.org header.s=google header.b="bvalEP/l"; 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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5x08-000147-EA for patch@linaro.org; Fri, 07 Jan 2022 16:42:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5wqw-00057u-C1 for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:32:50 -0500 Received: from [2607:f8b0:4864:20::432] (port=43911 helo=mail-pf1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5wqu-0007nI-Su for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:32:50 -0500 Received: by mail-pf1-x432.google.com with SMTP id 196so6161795pfw.10 for ; Fri, 07 Jan 2022 13:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ca53GjQ9RuhRXPL4DhHW76qKdYdJSEjrupmNQVoTgGw=; b=bvalEP/lzTB9fFpx8FUPn9tBqvZimS2X6a+6CsFKZUzus6kg1CZyDiqREy0GJKYygv k4RvgfDqgxmB/wdsNtXRWTzCX4Lu/DPq00Chir3KumghAzmbhIPg0AuEC/mfroLyBRTM Z6Sdp2DB/652+tHHdJJagcE4xNtP5Awac7xiR0mTNr7VgYMrDhB1KoO1y++PFT5ftlNE fCBDN1RuEGuLQtawAe84sCwhY434LBPnXAXuahXh1i6U/1WxC5maSYn1rLQry9ih01Yk YvKEi03DctGsAbNhO3JPj7wVUW+exoc4US+T2f3scYGOTBasIoKnK4FlT+Q7dN4CDJ63 7csQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ca53GjQ9RuhRXPL4DhHW76qKdYdJSEjrupmNQVoTgGw=; b=p78SmeI7lxZ4gi3+U9itdCHJF4PnlSpzdC7t2hTjEyXz2ZVC4QG4nRm2N0LBUAgarB tD1ajZrHEzAObWd3Lil+jvyCAF8IDHr3mKA/vxXVzwLdqduREFQbz1ifVm2RqfwK24F/ U8EwYQMQmrAtiSkyMRP2jaYhMkyhyCJesgIjuX8AIhZXnRhna9jrRK9eq9bRaVOCZnvY X+1vY51fSJQZx6zlKhDNZ8vE7C1w5IlWteZOXqIuIF6FV5oVNxlzShbzez4KSFdfecUT oZjWuVptQHIA2/Semi+zgFEHWWKWiOZEqfsVnCpCQkpCQzNpnTa1+WXTRtDQI0nF6aKt PaGg== X-Gm-Message-State: AOAM531KPY7LyjeCO95JMB5kDhLohWbf1EHG4qzhXodWDBSKOTQ1J+I1 Mn809J0QisDqXZYhoMmGZyfFAi07NtaeuQ== X-Received: by 2002:a63:905:: with SMTP id 5mr58455024pgj.485.1641591167640; Fri, 07 Jan 2022 13:32:47 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id y11sm6633030pfi.80.2022.01.07.13.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 13:32:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 05/24] linux-user/hppa: Use force_sig_fault Date: Fri, 7 Jan 2022 13:32:24 -0800 Message-Id: <20220107213243.212806-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107213243.212806-1-richard.henderson@linaro.org> References: <20220107213243.212806-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::432 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Use the new function instead of setting up a target_siginfo_t and calling queue_signal. Fill in the missing PC for SIGTRAP and missing si_code for SIGBUS. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/hppa/cpu_loop.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index a47a63176b..4740da1b7a 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -110,7 +110,6 @@ static abi_ulong hppa_lws(CPUHPPAState *env) void cpu_loop(CPUHPPAState *env) { CPUState *cs = env_cpu(env); - target_siginfo_t info; abi_ulong ret; int trapnr; @@ -147,26 +146,15 @@ void cpu_loop(CPUHPPAState *env) case EXCP_ILL: case EXCP_PRIV_OPR: case EXCP_PRIV_REG: - info.si_signo = TARGET_SIGILL; - info.si_errno = 0; - info.si_code = TARGET_ILL_ILLOPN; - info._sifields._sigfault._addr = env->iaoq_f; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f); break; case EXCP_OVERFLOW: case EXCP_COND: case EXCP_ASSIST: - info.si_signo = TARGET_SIGFPE; - info.si_errno = 0; - info.si_code = 0; - info._sifields._sigfault._addr = env->iaoq_f; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + force_sig_fault(TARGET_SIGFPE, 0, env->iaoq_f); break; case EXCP_DEBUG: - info.si_signo = TARGET_SIGTRAP; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->iaoq_f); break; case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */