From patchwork Sat Sep 18 18:45:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 514230 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp670403jao; Sat, 18 Sep 2021 11:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT0NJnNvTEi4lhGg31OSqCbl/swS8xolg9ta3vnCnG06fhfZ0Dxm7Sf91ZZ8bEOvgY8G3q X-Received: by 2002:a25:2cc2:: with SMTP id s185mr22236900ybs.196.1631991425121; Sat, 18 Sep 2021 11:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631991425; cv=none; d=google.com; s=arc-20160816; b=Vf3ESuaKZM2/Qiqgm315A15kNsgbQ40UrmKmAQFOOeXOweurw85cYUtmlBsxlVcFS9 q5ntwh5bZZ4sN9z958kJ8/fCr3K269Bpd/jlGkXALtGsDM7i/BDEZFNcCUMVKK2gPRKY hAvwkHAsk4N0biR6sqZqP2EHYmUDf63646BST4fGdAThl2ZYdNrbBynA4pBR+Vv1zHl9 8UHsKbreypaD/6WvWut+91J5HM4wdhVl4jGwNtN5jn+QUk5hPJRoqxdR9QO6VJhAnuCN Rgbnb/AkuNQinS3N5+MuyYh2bR7SRPMc6yZbwLzH4FzRiegrN7dUL5b84IEkuO0pfvUW bXMg== 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=DnPKZsYD4ZUYg+zokoIL0aqocBtGju8WD3IhYIaHRac=; b=YBTa/0gdCfGLLWafX56n6g6O/u+ky7aOah6Eq4mTYwaBrV46lR7/YgWRDt0K6m5elF Jlwenwcb6Hlrvnw9wuOd1iadKBiB9O1D3VSpqVtysDPZueaNvGWBf4K5ooRyCwS2eoHj PipVzZzhEVBZHtYlTf4W3xXasuB+zARxfsJoiMNCS9lV1eqXEGAdsMREowjRenfJM/Ie UebZ1SEcOC0HO5ZzfTIndj79ClsGVwrQCAeCw9HY0V3XrGpfKgx8TpzHMYaBnNIvtKFB omdIDHi/QObM+DWt8RvzLquXxVF5ZoWbkw4adS05lXbXj6IwRPWcpgRAtIhi9gtKWSOM HBog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yffMT/Zj"; 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 b34si10997411ybi.336.2021.09.18.11.57.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Sep 2021 11:57: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="yffMT/Zj"; 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]:33560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRfWK-0005TD-JB for patch@linaro.org; Sat, 18 Sep 2021 14:57:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRfLj-0005Ea-23 for qemu-devel@nongnu.org; Sat, 18 Sep 2021 14:46:08 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:45822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRfLQ-0006t2-Pz for qemu-devel@nongnu.org; Sat, 18 Sep 2021 14:46:02 -0400 Received: by mail-pl1-x635.google.com with SMTP id n2so5777437plk.12 for ; Sat, 18 Sep 2021 11:45:47 -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=DnPKZsYD4ZUYg+zokoIL0aqocBtGju8WD3IhYIaHRac=; b=yffMT/ZjFLfxgTY1cEQIo4KJSWtd8EXUzQkcHY5f071b97Hp70o8Ut8zWqC4KtrAMQ lnUsWQY6BkhgEClDKTjvMbMKD2opAQ5GsSBoXKHFzYMImNlcx1wO2WmT/fYCrtVFPZ80 0mfcVj/gOwXEQMSEplXa+2lzneBQN+Xp7f+sMibz9gprwv+Okhs7ermzjOao0eae5RH7 bpxzX9LbmsxkhMBSkr9LSflIbpQNPLtj2cmxr+ithqaJPl5cZAndQfQP2HipAi6sFmXk U9zuEtlWdu3aVpp6w0Nu4HWGGsnIJZnjSYZrTTJaNxh1ZwD4LJylnr9YgbYUKGUJRsg1 KD9Q== 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=DnPKZsYD4ZUYg+zokoIL0aqocBtGju8WD3IhYIaHRac=; b=AOhreCzuHnccS/34nzdqPe3LGnVN1s2iwhpAY2fJV79XGXK58mMmNmC3TKDmI+Unda cZuhy9timjxIpCgNxWgkmNzTztbToWTy5F6KhNCNw/09eDclP/Nk+34GMMMcr7kwv2zb bOJdUFQiNa/zIAfmlf2JSj0+PzIg5qbov5QibdHv3uq7JnityGAX1I0YTnnKtsB3svVU GAIuPoKk4DVLzyysj0CHuB58xPsyltzbvkhHBCPjUyu7smX0007JrYD6zOixrWmB09i3 Elz0ztXIJRPOeqvukKBptYInN+6TtxKV+0Idqcigu7fz4Qfe4n5lihTSYI/QXKHNDyPG B45A== X-Gm-Message-State: AOAM531Mh4Vrt3VUMOjHnXK3R6HxVHusFxZTOEztGf5b5mZSbzauW+1G bcyD9NVLp9l3BCqeZ/yPA3zt4N6Wcb78oA== X-Received: by 2002:a17:902:9a06:b0:13c:86d8:ce0b with SMTP id v6-20020a1709029a0600b0013c86d8ce0bmr15339135plp.51.1631990747074; Sat, 18 Sep 2021 11:45:47 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id y26sm9555858pfe.69.2021.09.18.11.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 11:45:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/41] target/arm: Use raise_sigsegv for mte tag lookup Date: Sat, 18 Sep 2021 11:45:08 -0700 Message-Id: <20210918184527.408540-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210918184527.408540-1-richard.henderson@linaro.org> References: <20210918184527.408540-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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: 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 diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 724175210b..2575e65860 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(); + raise_sigsegv(env_cpu(env), ptr, ptr_access, + !(flags & PAGE_VALID), ra); } /* Require both MAP_ANON and PROT_MTE for the page. */