From patchwork Fri Oct 1 17:11:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515076 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1013807jaf; Fri, 1 Oct 2021 10:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzvvQQcy34LtGCSLvR18OE2xUz/BpCM5rMch1qPfXWSi+B2pYLUPVDxOeo2Mt4P+3Ic5BW X-Received: by 2002:a1f:5f4d:: with SMTP id t74mr8615135vkb.5.1633109645099; Fri, 01 Oct 2021 10:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633109645; cv=none; d=google.com; s=arc-20160816; b=XZHlVXNPtbWoingil8Mo9kPL1HXcqDriyIzuzr/3A/J5LObSjEpotorrkrmmksm1Pk 4G41Tvd7zmeAfXJoxlIYuxFjaGIYn82W9dPeGplOb80s5r19j+9+s078z/14RIPFSo92 UmT2nxueShqOv+l5F91vGzlKkVF1Dr3Yc/w3QsTjysHybt+liDr7wUKbeMwaRaQ7G6br xj86v5J3eVkRv/QCJP3Liwwuvfv6/f+1uy1DacKp6jpks3qwPm8a+MaHYGpknuaXt7Hp DVozmxkfaoYAEFaqtmh7dVGChiiLUCIaIQ35wl6JkgMOKPCMQzMctciLPMy3HriWlc6K /1ZA== 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=c4orM2+k/w36SObBWIcKDbAPe9+W3VGWuqCQu4MwkhQ=; b=C4FYJ6m6UgMJ05dGBtXQ/e7ODeCwU2ikypI53Xaex7eguTtdOzxd8SdgygHqRl+6TQ ujaSk5MW2xAMxj/qQ49WsMVg6+tRRqxAhP4I9wI/jLFGIb2VsESZHtGY98KtusH20R8R N5NZU7i+ieTdEgenvCl9TuYiqwiC1PHyfq1Yx4pKEptDYN0CrgqEFPI1iyJtO2DzIhWI xR5yRVZGRUYWpZs5fDAT/+E2ww7xrGdWxuoNUAvnER1QTDbSI1zkKPBedr7Oom6TOlVw dKT6axtIV1jd27dX4T1WIGhrZo76Z26SbgDl04WKATpLMbtoHEP7r30bNLCSvFLMSusl oDcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ISZSPyoq; 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 y16si4923114vsg.116.2021.10.01.10.34.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:34: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=fail header.i=@linaro.org header.s=google header.b=ISZSPyoq; 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]:43896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMQ8-0006CR-GR for patch@linaro.org; Fri, 01 Oct 2021 13:34:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWM53-00050T-Fr for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:12:17 -0400 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:46631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWM4z-00059s-R4 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:12:17 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id gs10so5960158qvb.13 for ; Fri, 01 Oct 2021 10:12:13 -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=c4orM2+k/w36SObBWIcKDbAPe9+W3VGWuqCQu4MwkhQ=; b=ISZSPyoqnInbLT4amaVBpq1c+UCl2x2aHxa++rXoEoRooNJOAaPMYFigVc8giI18Rl +MICo0zWP41vRJ6GPpiiuMx2C1XJP1ZAJn/myacVu3hWRcXVkDG+rL0/b5uAFIPqk7M9 yYwnXVBQwcDz6Rf6HmeFV4UhwepWeB9tYWJ2Hp+Yv3UBtkNYx4Pj8qgY6N+uheCC2Y98 shcPrUfEeNcRAlbbCEIlILGHHOawXp7h1TOEmt8wwtAAWv7ufe5nYoaPL4+wYFfcURYQ GVKkCFiwzJ8U0KzlnISobug6mUTvgkK09uYlQmMgi6i0Lw8c2kQ8igCw/nf5p5bMlv7F G1Og== 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=c4orM2+k/w36SObBWIcKDbAPe9+W3VGWuqCQu4MwkhQ=; b=lJZt4gBV/+EG7SYPga4VbvmfbXERykMd6DCZd4kiAxD6SRTFbGVNieUUI9uqlH/TKs kJETS7CA/7SwAQFU5bIb7N7Cb1Kx4oOnf+BwzWnXjV37cj0c4jYjgPQBShQ/WtuEaFLB rTNB/rHa18fWt3i3SlzKexxNktY7/H3vWxM0W4hAspYz2dsbe5hkLB+rBXRk2An7SJnF tl0fGTVJQ7fwvvGRbnWol5IGabAnaKrvDSwZ11X97kH1b399piLitpuOJ/yql4iPI347 nVjBYN1dBB+qpe/dMWN6/Y8pjV82xPn3PRlOVkWA3VkLXIFph5A2vh15tVHgAvJwGVOV m1mA== X-Gm-Message-State: AOAM531oqTcwCXLh0MZbqBxlkXV3FIGFOeNPRT2MhslBCnwJW+1DbWpW HEyKxX5RJLoaf9DxSfm8agG56roG0aMDKw== X-Received: by 2002:ad4:5643:: with SMTP id bl3mr10198290qvb.54.1633108332577; Fri, 01 Oct 2021 10:12:12 -0700 (PDT) Received: from localhost.localdomain (c-67-174-166-185.hsd1.ga.comcast.net. [67.174.166.185]) by smtp.gmail.com with ESMTPSA id y15sm3557250qko.78.2021.10.01.10.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:12:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 22/41] target/arm: Use cpu_loop_exit_segv for mte tag lookup Date: Fri, 1 Oct 2021 13:11:32 -0400 Message-Id: <20211001171151.1739472-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211001171151.1739472-1-richard.henderson@linaro.org> References: <20211001171151.1739472-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf2a.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 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. Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 724175210b..1500a498b0 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_segv(env_cpu(env), ptr, ptr_access, + !(flags & PAGE_VALID), ra); } /* Require both MAP_ANON and PROT_MTE for the page. */