From patchwork Fri Oct 15 04:10:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515806 Delivered-To: patch@linaro.org Received: by 2002:ac0:da11:0:0:0:0:0 with SMTP id d17csp141044imi; Thu, 14 Oct 2021 21:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz0LRwPup4MszvUwJfyb5my3RpCTiQC5HACoz3ShT70ubX1FDdwAOVwhs5D7NiEZj+QIMO X-Received: by 2002:a92:4a04:: with SMTP id m4mr2236132ilf.137.1634272105827; Thu, 14 Oct 2021 21:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634272105; cv=none; d=google.com; s=arc-20160816; b=b1HkgYZnOeNXfo6kEDzNQpYLPB5iMZEzWA2L8r2F0tiEbEpFINb2lXQt86aNfHhNye T2lOxv/9wvl3apZR67XPao3VNDvc9NzNPI0mMQBnQqGZBq8PpO4nwAaADMUg3ixfhX7S ucRtwkXwqD+/JeM4qIrcBWIYx03YnLZwmca0wMcSxkAQc9CEn4cKcQel5FsIN5k2k6Ls 1O/VRdc461oJWnaIEeL0U2tKdlls0pOwUdRRsz58MuvrFxWl7Ik8lXemzxzm7N+1zwN9 s+LCGgzOVNlZnXhrVYulz9yVcmWrIgiEabu4ScMgVVFQEPgjtP0qyQ/dp7m0xSvVgRgp 1g9g== 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=gDo26nxZuCe6knbSSj4pxxnp0xROgd5wgByOtwEaQmw=; b=F3ptjH/2AYyWx7wXUWIVP++Jsm9IBfAGM0jGhx9hdOUZ12Ys7dbse2O983WpdpgXL5 nH3+6qefARrR28fG+RgL5Ad3cKNFWe8Ff4ISh82YlyyS2dHmO1In2zHJMWW5vaeXDx9F rnW3f9Fny6lzUSRGGwzoG8I8anNKvfac0SaNVe8F4GdAPxbZNoYt+Ccm6dNHPA0oxCz9 91PuLhGfHxLoIQmDqXZ2dRnGC3rPgYm42B5fzCzKbLPxL/ZFo8lo5ESM65MOnvRXB/Od rFb2VkYe+RcqlxSYYRcgy9KJ43VRPtNuA7aBruIU9lWaDQ8nNw+PMbwcLbduEH1j8w0t yBJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="SUyDN/bf"; 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 g4si9292968ila.181.2021.10.14.21.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Oct 2021 21:28:25 -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=fail header.i=@linaro.org header.s=google header.b="SUyDN/bf"; 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]:48962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbEpV-0001GL-6k for patch@linaro.org; Fri, 15 Oct 2021 00:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbEYw-0007HY-UT for qemu-devel@nongnu.org; Fri, 15 Oct 2021 00:11:19 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:44928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mbEYt-0000Kq-2z for qemu-devel@nongnu.org; Fri, 15 Oct 2021 00:11:18 -0400 Received: by mail-pf1-x42c.google.com with SMTP id v8so3157928pfu.11 for ; Thu, 14 Oct 2021 21:11:14 -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=gDo26nxZuCe6knbSSj4pxxnp0xROgd5wgByOtwEaQmw=; b=SUyDN/bfj0pqlmb4veDFS7djOwRGHBtR8olsDB7rbMU9HqnIaNvkuCOH2u+Bg77bML NpXcn9smrHVUR3O/lG6oCWaiN4/XfH+wiNyxttxthkCuuaKE4dfLJEemRbw0XCLfmTYu pn2ODCUAqMZ3N3jZLVP8sRpii8uYMuL0JDCEONcQolzf0WptIX1o8nWV26pWhSLbnq8p J8hTjb87HrVA1vkBGtRsftOaBl9U8o6EoflgSRiYXjTLUVqWcY6GCSE11wdM8bDZkJUl zU6kb6e4+7yOgIy9+2siq9U30ySKrB5HgriUdnBIfQX8e/GBVjEFuW6BbcX5n3EU/obd Csow== 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=gDo26nxZuCe6knbSSj4pxxnp0xROgd5wgByOtwEaQmw=; b=W0b8GJYyyRs1ZZ7hDe3dSGdRVorINJ8gJKcNNiNNtPX4OVRrcSMRPKNHVx4x0FYHIL 0Z087h4nYLm0qrhXstSQpspg5FUpxjbEK3fNvmxLADFZR1zt3Z4O0n5KjRtQHKQVLuzw f9WKHkN2/XVsc0z58DOsmoIQnbgcNGD6lzRhbXTAsQBZA9W2lQLTS2By9zJyN0G0WSMI S79rS8ln2cmP8ihRpyeXp0o7gbTbQtwNPSsuNb6sMXj4nXsxmyl48+ReE+kxnY3a1jVC 4vn6Ss20dYS7zVO1/BGWAK0s3m48OSRBMg06gOJ6PCZkpXi2quWaL6BpIjzR1QGnJERu OdGg== X-Gm-Message-State: AOAM532RpKQwrEu+/2cEsqMxp2cVKZziOWveuZ/veMlKQbsf+I+/XfeG ofjVNFu4m5STnsJncAL0cvFni/28Ljg= X-Received: by 2002:a63:b204:: with SMTP id x4mr7163143pge.212.1634271073744; Thu, 14 Oct 2021 21:11:13 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id me12sm5718006pjb.27.2021.10.14.21.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 21:11:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 22/67] target/arm: Use cpu_loop_exit_sigsegv for mte tag lookup Date: Thu, 14 Oct 2021 21:10:08 -0700 Message-Id: <20211015041053.2769193-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211015041053.2769193-1-richard.henderson@linaro.org> References: <20211015041053.2769193-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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: alex.bennee@linaro.org, laurent@vivier.eu, imp@bsdimp.com, =?utf-8?q?P?= =?utf-8?q?hilippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Use the new os interface for raising the exception, rather than calling arm_cpu_tlb_fill directly. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.25.1 Reviewed-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 724175210b..e09b7e46a2 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -84,10 +84,8 @@ static uint8_t *allocation_tag_mem(CPUARMState *env, int ptr_mmu_idx, uintptr_t index; if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE_ORG : PAGE_READ))) { - /* SIGSEGV */ - arm_cpu_tlb_fill(env_cpu(env), ptr, ptr_size, ptr_access, - ptr_mmu_idx, false, ra); - g_assert_not_reached(); + cpu_loop_exit_sigsegv(env_cpu(env), ptr, ptr_access, + !(flags & PAGE_VALID), ra); } /* Require both MAP_ANON and PROT_MTE for the page. */