From patchwork Sun Aug 22 03:55:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 501407 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1062155jab; Sat, 21 Aug 2021 21:05:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynul8p8h7nUqCSJ6/MNYLz9nYSrvDBrgNDpJbPdVU9qvLTQL5KMTk8fnJRYKsYbCafl6Sj X-Received: by 2002:a25:ad96:: with SMTP id z22mr17470480ybi.137.1629605105114; Sat, 21 Aug 2021 21:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629605105; cv=none; d=google.com; s=arc-20160816; b=xU4/i/5JnXg1EaBMcwzUktbD7vhZCLX7ztK73qfS1xQB/br43pFG4V/jd9jNduX7Z8 WK6c474oukutaEKHEqi7ujTnxIYzQ2VXVt7Ks2Qm5bJ+UMW8t4A+CwKVxNNb8ENdxNzT 7EDNgtzGF9Oa3ZPMUXlmjZOgjTetrzFDHLuccZeAhLMn4XalZB7634FFKNbKfCw50OyV i6NRhfCciC+SV39kk0sPGG8I+GYZ2NbXH/EFOBQb7H3kDq6igetpSgJdJVAbt0VWJGKE VWqYDdn2CCKhdM2gu1EQC+LLMSWXTfeQsOaESC6RG6p2CMuwBE+Hh3wub5JREq8dTh6H wOFA== 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=aaG8+wKRstXR/idWhImzrCGyhK5/kWZ1S3StnyK++N8=; b=pqWXgKHh0JgwXCVLiJoI8kP5qO32VRcxLfPO24r7Jjib1wBQyizAUITKrKP6EnPkHq psdVwmXL8re+qBWkyIWrdr867Qojy4JjrSa6EZGhbFHb88kTPGxbKm9rIm7vQwfqd8Kn C041HttlDQZZ3WHY7Okgxm9lShPInWUSdVtRbQWK0hkYlJ76J+vHzacn2Nf1D3fWx/0x GR7FTdPV9Dq4NP4Tkb0OKzVwIAAaQihrpOd0HX2vxdHUuqlqcJ/EBt7LmyRSbj8x7wW3 bGohqe8OoM+n0NGjw/CIbop8dl/BpqsBT/wCk1RHrA+4aAA0P9OXu43ksqik54DH/f0c H28w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JhSE/FCD"; 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=pass (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 v11si10161123ybl.152.2021.08.21.21.05.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Aug 2021 21:05: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; dkim=pass header.i=@linaro.org header.s=google header.b="JhSE/FCD"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHejI-00080F-Jk for patch@linaro.org; Sun, 22 Aug 2021 00:05:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHeaJ-0007nn-NY for qemu-devel@nongnu.org; Sat, 21 Aug 2021 23:55:47 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:46042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHeaI-0000d8-4p for qemu-devel@nongnu.org; Sat, 21 Aug 2021 23:55:47 -0400 Received: by mail-pg1-x530.google.com with SMTP id n18so13344828pgm.12 for ; Sat, 21 Aug 2021 20:55:45 -0700 (PDT) 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=aaG8+wKRstXR/idWhImzrCGyhK5/kWZ1S3StnyK++N8=; b=JhSE/FCD9VpeiNgtOctsp8rBwzZ3IWhSLO/0K0C75LXZxUnzmJT06E5gmwz8kVIBxo 42i+SDOuvpRUWX/gVHzjRT9xn9ioLdgafmnxhksVVDRIsM/LMGLj7EpCbUAWrEAtNcNq etwYjwJAk7fsJhVtbZwZbsrnlQQf2csbX82lxG3OpfJsMJNzN9qcmZJ0ZMvBmBDG1xzU 0ASOvagUhCEBNtUPS3824vah4EBnELLkhGPm3If0lhnaCPnoZHjl9oFl/rmYi+4HEPzC ogbSWtWEOWD31DQjeWSs80TX7ia2Y1JcAGIxwdNLAj5a9JDniZ5HDnJFaeIpzr3eouXc Gihw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aaG8+wKRstXR/idWhImzrCGyhK5/kWZ1S3StnyK++N8=; b=PuT0Fd3IAAFDmo09/vZb7qI8Wl9vdrCX9MSPaA+PxfYtBI1b28NBfgKsCB7bcCcMci Q19OUpfjl85TWy2ZzflAp86+qlfCYXk2OiNYK3RPEq3Nr4kxe0GYL47Qq8v9tkEUjWbb Kh48fIBNnr47RlKE0myN/VrsUrNEJ9a2PLmQvapJ1AL4F61i32O/BCjqs8V3h8bUtl7K /F6cDP6nNw5LjtdcnPc4+o3XpK2RoHcRRIn1HZmimNhdoS7CGdfFZsxkOT5pTXbF2Ck1 m5q6Eoo56FgQz/weTPduWOozhCS//VQKhENTg3uptV67/wXT/mjvkmBv7SA5bJmg/8Go k/Qg== X-Gm-Message-State: AOAM530B73ckA381ohqiiCs0VQXSs+1aDTqd8HPT6uJXSLbog1G8iZHq NXJ8wQbztfQccd4DIuwrjsfA8ZdzdngWCA== X-Received: by 2002:a63:2585:: with SMTP id l127mr26702754pgl.264.1629604544819; Sat, 21 Aug 2021 20:55:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id x12sm11560533pfu.21.2021.08.21.20.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Aug 2021 20:55:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/30] linux-user/alpha: Set TRAP_UNK for bugchk and unknown gentrap Date: Sat, 21 Aug 2021 20:55:16 -0700 Message-Id: <20210822035537.283193-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210822035537.283193-1-richard.henderson@linaro.org> References: <20210822035537.283193-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: peter.maydell@linaro.org, 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. 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(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a5ce487dcc..55ccc6ae03 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 7ce2461a02..b2e9503c50 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -99,7 +99,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; @@ -168,7 +168,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;