From patchwork Fri Jan 15 22:46:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 363796 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp273549jap; Fri, 15 Jan 2021 14:55:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkkOqYlVI8k5VIOxhAkRwKwy9AVmsgSkW5KoAqwWDMkYqgqweEnslvv6xBCZ/ZgsFr04lL X-Received: by 2002:a25:678a:: with SMTP id b132mr22094539ybc.516.1610751313950; Fri, 15 Jan 2021 14:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610751313; cv=none; d=google.com; s=arc-20160816; b=tVpP+4rgehYdUUlRt3RxFEeYTj4keZ6/+IY7oThopRH+2Twe7yknmn0piIzyjIAsQt 2Wc0xuG31S34C3BGWLs+t5W4JDWfELPc5JtDcjVnXHEwiO7MAWaUIG5ccT7Ssr2R6ZQN dUABmT6GB8Udoz4/3gNNQyZyjJgKhHl/L3BvoZsvOI2OterCZwKPQer+YLZHwhHjNx8a NJE9N5A4UAEukPi6MA7ZKk1QmDW3NTvKLZWc27eKM0hsTxHMIJSZAKP4VgeqRe0fOEv8 pNjZiNbdbdWSL1vcffN8sbq7U5okxc3wIuSx23scBnwwyDOiWuuLN8oHS4cudyY4jI7j yPuA== 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=6xhR+Wss/1TBEEfYwI3TvMrUfFA269smX1ho0M9IxOI=; b=Re4NnJIpyPncD64RebbHBjXQprIR1pOZEvMQ/taV/n3ug0tMk6k9qFQ0+N5tOXEHoe u+nvDF+OVyjg5WW2fcfKtf9Lw61xUKQUjNoSgICnNLIJYKnRbmoFmP+Uy2zIAB8+QjTF LTa4vqtK2jwQ8Zq3kBSK91aAnowApfEkc2arfgWC/KMlgJPYR3ql8Yv5MXqlGXDp2cvz uAhkMGTiFka/PLIK98FTT4sHkxFhqlwRYcfCFFX9B0etna13gzyqvTN6nx49//ZuMpcV jOaGVzzdhSAji/NL4JziF0ZL1pScTF0y0jT9RcOKxt8t0e+FBgRXH0IjDzXdbdTeR/QO muLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JnQ8QGg4; 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 t25si10344060ybt.299.2021.01.15.14.55.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 14:55:13 -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=JnQ8QGg4; 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]:41528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Xzt-0003Np-DJ for patch@linaro.org; Fri, 15 Jan 2021 17:55:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0XsJ-0003mt-FS for qemu-devel@nongnu.org; Fri, 15 Jan 2021 17:47:23 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:37688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0XsD-0005Ie-KD for qemu-devel@nongnu.org; Fri, 15 Jan 2021 17:47:23 -0500 Received: by mail-pj1-x102a.google.com with SMTP id g15so1760177pjd.2 for ; Fri, 15 Jan 2021 14:47:17 -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=6xhR+Wss/1TBEEfYwI3TvMrUfFA269smX1ho0M9IxOI=; b=JnQ8QGg4P0SWQVCDznCnfTfLo5HbgayFH1jkcgJ7cs43998FeIl9D0N8Wt7zS+RJZU d9YeASIk+w2OuLNvplylox7MKfrpxkPhmAGh9YOfWfLe3QjD7GxsVBexQSCjP50XFcIy BdYw3KVr1qb7IXePM4vP+aaxbicDjYyBXw0FPfGC1b+TGZRcXkHLZ/8omVtyBIEn2LrK eriD7Xwm/ffD9/M6nS8blO1+qQJS5IjEzQD3yaGs6zGtNca1GjOaCNATIp6qM22tSL5u 2w1iZae0p2+c4CL36BVFiy1hBoAex7Z/SdD+oVXXg4fUv91i+NKizxWC1nE9IRKP9OYT A6cw== 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=6xhR+Wss/1TBEEfYwI3TvMrUfFA269smX1ho0M9IxOI=; b=ZUrN1ZZYEwqyMwSd7E2o9UjNz+tOz6d1FFlTlXu5IkNXNZfzxQp78n0X1tM9xgsgud cdoyxCEx5jP2y29guxfeHQaW/ukMvIgfK6lWKbIKr0F8EBuAzK23zKT8naUctFDI4XR+ xNJw0Gg8K/PK2Gr6ht859bRdQLcN4mezlrubRLWh2APj1vczym/c5fdkCIocNZ15e3+e b91fHoGDsHh3Mb5oviBVb085KeCGYNIIoNi9AX0SQWfBxkH3dIRospxJe+7zA6/xnwU5 lXw5EaBy6wHplcxxDdohuj1PkT+FKfaJpZ97PdFqL5ksisnYzkqXkcCVGakSCa9BKqXy biOQ== X-Gm-Message-State: AOAM531xB3Q2AjvMy52Fye756aTpCGByZC49jIBQhloJYZ5oFrvTj/44 vB/Hn5xCM/tiM9YFaPLm/mz0wPbLNZmK9lzK X-Received: by 2002:a17:90a:ae13:: with SMTP id t19mr13247354pjq.52.1610750836340; Fri, 15 Jan 2021 14:47:16 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id s13sm9521700pfd.99.2021.01.15.14.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 14:47:15 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 17/21] linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault Date: Fri, 15 Jan 2021 12:46:41 -1000 Message-Id: <20210115224645.1196742-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210115224645.1196742-1-richard.henderson@linaro.org> References: <20210115224645.1196742-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/cpu_loop.c | 3 +++ 2 files changed, 5 insertions(+) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index ddd73169f0..777fb667fe 100644 --- a/linux-user/aarch64/target_signal.h +++ b/linux-user/aarch64/target_signal.h @@ -21,5 +21,7 @@ typedef struct target_sigaltstack { #include "../generic/signal.h" +#define TARGET_SEGV_MTESERR 9 /* Synchronous ARM MTE exception */ + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* AARCH64_TARGET_SIGNAL_H */ diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c index 7811440c68..6867f0db2b 100644 --- a/linux-user/aarch64/cpu_loop.c +++ b/linux-user/aarch64/cpu_loop.c @@ -133,6 +133,9 @@ void cpu_loop(CPUARMState *env) case 0x0d ... 0x0f: /* Permission fault, level {1-3} */ info.si_code = TARGET_SEGV_ACCERR; break; + case 0x11: /* Synchronous Tag Check Fault */ + info.si_code = TARGET_SEGV_MTESERR; + break; default: g_assert_not_reached(); }