From patchwork Tue Apr 6 17:40:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 415928 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4781587jai; Tue, 6 Apr 2021 10:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI/4fP5jWjQ7HfBIrSZ1LoYPKiKu0DuRoFglcWd1bqsgXWDiW1OnRg2nAIUBYaNUQmVc8Z X-Received: by 2002:a92:180f:: with SMTP id 15mr25918948ily.116.1617730905191; Tue, 06 Apr 2021 10:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617730905; cv=none; d=google.com; s=arc-20160816; b=Tkr/QJua46c4jPNBv7Tcp8q6ivydK7ctpUEjZl0oFWo6PzKI9gFs6fEgz+Jve0LLuJ NQNwAWkRQMhw875z2ec3OF3UFC5mvnOCERvocD8IYnni+JZFNwXRFcRTXLkPCpaDosLc 433I0l/QcUhPBN+p16Xi6bpRXNEUtC25F8XXuL6HeWrXaNjhnMOKK8Q3efq3qQy6bgOL Gd6tX+TpW2vfJVLuK2RR4ucqj7SBXEtkCUAeqYas+OQ3Y9Ues/Z5Q483ObezYb07BgPy 4eV+UemH6k8/38WJhuKnWudfNQqQ6Itmo3G5CYhdypkdeo82rZmPAcU2rDpPyOWCqsBG 7tTw== 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:message-id:date:subject:to:from:dkim-signature; bh=sKk73qUHSFNSDZq2+y4JQIWdiK15wkPN1fPW2vJPnP0=; b=wW5erm140K73hC16nLYTAGPLhZC1xGalvpr1JmnPUscYFbdq3VgqSsAcKpJ8SaoN9N 3XkijvF43afWVJD+J3iUeKZs0yln0FNbiPvNmZEcqbbtWb0toBQx8wCx2MA/zLBlfj38 yFdRtMCXM9zdcUJXNpH7NtL0p/82y1pSeRKNe1rphPBualf8VK7Z+PUjfOnZ08U5tTOi IezWxhWStXuLasUjE/lAxK6M5NyIqLtTfv2R/xndbsCDVOzSaTTGpGJUYRni5FSz8r5H EK8eKz1aTsx03kcNEajjXhpyDBE74aOO+k753BtcOiuBwgzN+svbHKSM8x0mUPlrHv5L 3KoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HsQVOWdw; 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 k15si18654483jan.49.2021.04.06.10.41.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Apr 2021 10:41:45 -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=HsQVOWdw; 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]:43984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTphw-0001b7-Li for patch@linaro.org; Tue, 06 Apr 2021 13:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTpgr-0001Yl-LK for qemu-devel@nongnu.org; Tue, 06 Apr 2021 13:40:37 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:36429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTpgo-0006HZ-Vk for qemu-devel@nongnu.org; Tue, 06 Apr 2021 13:40:37 -0400 Received: by mail-pf1-x435.google.com with SMTP id g15so10965142pfq.3 for ; Tue, 06 Apr 2021 10:40:34 -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:mime-version :content-transfer-encoding; bh=sKk73qUHSFNSDZq2+y4JQIWdiK15wkPN1fPW2vJPnP0=; b=HsQVOWdwW1HuzpU7ldowYPinKfP+e6RBzG8OIcrmL0TJ9er3r/AAxGGC1aXRnJWOxu NU7BucZj7d3KQOxw0IJqZ2uGhE1G2coYTKcuRxoGE2rfrZGrhscS1Z87NFozqyOCB7E4 m/IbIM232ltno2dESrRdJ4DV9s36zvzpf4n0i3M8yVdTeZw38tQDMd31I9yZ9h1mXdCp XAOpuznHkR0fQ+OuUMA/WpPj1gR1f5GiV0aWcdEI49CQBbMjMQGCQZa+buyNY7sx7L0S odvMmTI5dtrEspiLfg2JSicH4ENcdNngWNj8H5q7awrwGR8kmlj1VLflDZXItVkpNx1x s05Q== 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:mime-version :content-transfer-encoding; bh=sKk73qUHSFNSDZq2+y4JQIWdiK15wkPN1fPW2vJPnP0=; b=f+kwFAyRTDfQFq8UbtBp2YvlJvtKTRY1VJQYA9tAZSKor9k329i16tCuP0WUfFJ2qW WXxaWJShi6LW1ijC7DEvwf27r7k4gS3b4SNKZeOGL9eFAEwa27czRAyk0xbNeZkApWf6 IBUvu5RGe9oOP2JFfjClNDEEY5x8fdeBgO4igycOaCQZGFIeBOs+TjwgB+6IKQ+zzheL MmPogIbtHSth4/WRr6DKEEsbGeOtEKYizOWmmelquOdn6aXY2hn07cBinzr3lKjNEwK+ FTeiM33A75k0Vihkxh0z5S0iXR3UJLOmYRRja+ajiAs8Ly6yOq1CxUTXhmyWEpYEpXAt vIwg== X-Gm-Message-State: AOAM530tL1Cs/fCH+ZnK6KKFcXaaCmUQEonuqTfqccT0CrjfjU8T+5XR VP/Zx7varJeMwBNMZ7a0nmP1vRsdgjTlAg== X-Received: by 2002:a63:c90c:: with SMTP id o12mr28539223pgg.210.1617730833352; Tue, 06 Apr 2021 10:40:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id h15sm19148056pfo.20.2021.04.06.10.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 10:40:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 00/12] target/arm mte fixes Date: Tue, 6 Apr 2021 10:40:19 -0700 Message-Id: <20210406174031.64299-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes for v4: * Fix tag count computation error in mte_checkN, which when used by mte_check1 in patch 5, caused all sorts of KASAN failures. * Fix PAGE_ANON / PAGE_TARGET_1 overlap. r~ Richard Henderson (12): accel/tcg: Preserve PAGE_ANON when changing page permissions target/arm: Check PAGE_WRITE_ORG for MTE writeability target/arm: Fix mte_checkN target/arm: Split out mte_probe_int target/arm: Fix unaligned checks for mte_check1, mte_probe1 test/tcg/aarch64: Add mte-5 target/arm: Replace MTEDESC ESIZE+TSIZE with SIZEM1 target/arm: Merge mte_check1, mte_checkN target/arm: Rename mte_probe1 to mte_probe target/arm: Simplify sve mte checking target/arm: Remove log2_esize parameter to gen_mte_checkN exec: Fix overlap of PAGE_ANON and PAGE_TARGET_1 include/exec/cpu-all.h | 4 +- target/arm/helper-a64.h | 3 +- target/arm/internals.h | 11 +- target/arm/translate-a64.h | 2 +- tests/tcg/aarch64/mte.h | 3 +- accel/tcg/translate-all.c | 9 +- target/arm/mte_helper.c | 185 ++++++++++++------------------ target/arm/sve_helper.c | 100 ++++++---------- target/arm/translate-a64.c | 22 ++-- target/arm/translate-sve.c | 9 +- tests/tcg/aarch64/mte-5.c | 44 +++++++ tests/tcg/aarch64/mte-6.c | 43 +++++++ tests/tcg/aarch64/Makefile.target | 2 +- 13 files changed, 227 insertions(+), 210 deletions(-) create mode 100644 tests/tcg/aarch64/mte-5.c create mode 100644 tests/tcg/aarch64/mte-6.c -- 2.25.1