From patchwork Fri Jan 7 21:32:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530497 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp718538imp; Fri, 7 Jan 2022 13:38:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwlKlTyZ1c+hSGR3zQ4XHOlg2hA0JRsp3GFqHndQFIhUeFmyODFGxu7d0MtDUCi3Ui/bMI X-Received: by 2002:a25:c514:: with SMTP id v20mr4503270ybe.684.1641591482481; Fri, 07 Jan 2022 13:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641591482; cv=none; d=google.com; s=arc-20160816; b=BxMwof6ciH8cVWw9AJDbbubDM77+hl3d20BKSWsbqR2UUAxAEhcuOfW7yzPls6xR6p oLluQoL8pa/rNa/klKQ6xpptgetuQLRiqQXodBcGOIQRq3InKv9MaeLAYTUHb1DJYSVW zSNS/Bwvv5dI65blWjC/JIgycdHwqBuBNcSzrGOYI6mCRo7QFpMssALWDDPhkxz99+Id jbpgqG0pDSm75fQbK+gpDvMpAT3i4+8ZM26ufOGRdhKyzv6uQLe4P+MtTgz1MfbPMZYU b+jxz5KzEfqJscRVEHg66d1YqnRRfMIWB4q4lcExQ8xWVwNUM+6q5EPQeScb11rTH5JR 1Isw== 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=fwWk0WZDtoCdr/BQ+wy5whxmME6fmMq51sJIQEkG8UQ=; b=pHgd7K7JfZYq4jmd38yQf7LyPC7FfS9gpWroIdFyAg2RjYDK6kg7zuvgC1/XaHhyPj Jesu8IJ7IpC6EenCWJQ0/SlPxAAfsFZ/tY+OVxgNiv+7B+KKjgT0SxcyDr9LRsuqCkuy MypxQNHZO695EI7rWxPObplahM4QBI+YS7SH08dRIv3Bp5F2o29yjyKvOKpcJ8EKBaEC 8845t9Ii6rfTiIHKM6yzhurAKocSpE+RbKtivYqP49nFl9FoWA5CVvf1r9hPmY0VLjOW qhegsvYvrb55fQfkDYmYNEW7MXFdM8UV//MCAV0w8dRUhwMGq0oyDpyPOxa5gZ9u7iqw 6RXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DUK9d69H; 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 n4si1142016ybl.728.2022.01.07.13.38.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jan 2022 13:38:02 -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=DUK9d69H; 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]:47274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5wvx-00034n-T6 for patch@linaro.org; Fri, 07 Jan 2022 16:38:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5wqu-00057p-PF for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:32:50 -0500 Received: from [2607:f8b0:4864:20::52b] (port=43679 helo=mail-pg1-x52b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5wqs-0007lf-Lw for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:32:48 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 8so6481096pgc.10 for ; Fri, 07 Jan 2022 13:32:46 -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=fwWk0WZDtoCdr/BQ+wy5whxmME6fmMq51sJIQEkG8UQ=; b=DUK9d69HZDkSgCk+JMnw4frbTHSlpGqbY7ulCAFmucA3TUpJcXkOIevnB+BO3cPmSi oY2V8gWMpVqBpT+pnNBsOtfO3oFCcQpUYv3TrA29VnLa8o88LXoZvlCwoFzKxH52bTcH bynz106HUykw7/JkMUMqWS+zP+yOD7pU/lkQdLoxL9xf4+uYCl2ZBsjiIGrFEMYTQuMH 9c3YAilc0ElDefGWykKg9PV5oDxJvew+VeX1WbJ2J/v7IQdaQQ2tNEP73zcQGiTH0IrD 2C7jAi0NMiep08/GEFN6Gnamh9PH1TNmJnvyornGKglq3ZDvTKVgJLsFMb7eLTnDmN9+ wN8Q== 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=fwWk0WZDtoCdr/BQ+wy5whxmME6fmMq51sJIQEkG8UQ=; b=CLmllXt2OJew+idq61rUhX9ft2j4lAOBP/RXwwgBaO9TNO0vE25R/6ha8pDh6FSf4A 5BepId4q03gFmCiNQDws5WdINxTEyp6ZPcrQrvtXbsyDNwdctxC3HWbwyMItqVZ9fMYq +qle1TUs49glXyGkMzMmWilkyuaeMXR99ktmO0UzrC5HRO7rzYZlWHol8RdRK8+yrc3w 0wqYqZ7dWPGl7h/LXytnm//GLmd/1Y/Iozwa/7do5FE+wfd1Y3RH/3UuaYYU9h9I7Rgj cQOcV7fDUNb8+4A+yruqhNPlxMjb2A6wGGnTs85OSBdIg/D64HzgvOW9CV8bF0aTsoO8 Rpcg== X-Gm-Message-State: AOAM5321UJKoN6PdClTszQFTLQuVEaV8rew8tMr3AZOzpL67pieu5WgD Oiw0t/hviE9fS4Uxby4tfdhmMquh6Vy4TA== X-Received: by 2002:a63:6945:: with SMTP id e66mr57320935pgc.237.1641591165392; Fri, 07 Jan 2022 13:32:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 13:32:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 01/24] linux-user/alpha: Set TRAP_UNK for bugchk and unknown gentrap Date: Fri, 7 Jan 2022 13:32:20 -0800 Message-Id: <20220107213243.212806-2-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::52b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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" These si_codes were changed in 535906c684fca, for linux 4.17. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 1 + linux-user/alpha/cpu_loop.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index cca561f622..18bed558fe 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -715,6 +715,7 @@ typedef struct target_siginfo { #define TARGET_TRAP_TRACE (2) /* process trace trap */ #define TARGET_TRAP_BRANCH (3) /* process taken branch trap */ #define TARGET_TRAP_HWBKPT (4) /* hardware breakpoint/watchpoint */ +#define TARGET_TRAP_UNK (5) /* undiagnosed trap */ struct target_rlimit { abi_ulong rlim_cur; diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index 37c33f0ccd..96466b23f9 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -86,7 +86,7 @@ void cpu_loop(CPUAlphaState *env) /* BUGCHK */ info.si_signo = TARGET_SIGTRAP; info.si_errno = 0; - info.si_code = 0; + info.si_code = TARGET_TRAP_UNK; info._sifields._sigfault._addr = env->pc; queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; @@ -155,7 +155,7 @@ void cpu_loop(CPUAlphaState *env) break; default: info.si_signo = TARGET_SIGTRAP; - info.si_code = 0; + info.si_code = TARGET_TRAP_UNK; break; } info.si_errno = 0;