From patchwork Tue Oct 15 16:35:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176386 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6181127ill; Tue, 15 Oct 2019 10:02:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQZ6WnlIApN7HukzsHV+s6W7z0dSrAueRcR8rVyTXXsGztzN6SuF/y+Y5/dgHl3tozxmoO X-Received: by 2002:a05:6402:6c6:: with SMTP id n6mr34939999edy.292.1571158948345; Tue, 15 Oct 2019 10:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571158948; cv=none; d=google.com; s=arc-20160816; b=LHmj4Vo5sbMXrYgb9fj+KtKYcowzvBy1EWO8PT55rM8Pqmn0fT71GI4Ebm3n5v4eKK 0+4YwMahS/rTZSomCQBAPAQo378Eyz4pTBkK3zNuMD38+SSDuwA4xoHdAPOY7xCKWhZc fowITUPhjfVmQ2VBv5RqNDfuvD/2c0WWrgJp1K1UvA+5VP4phiEJm9JopnK13keuHIH+ xzh5G5733lp8CnDrJN8xn/o2FQKhRt88Cp/0X7FFxgAdq/642wKnbefVKYFd/XRg0Ks5 ZepgI0ydKBvEsf0aU0ZBT5A22JoUu9X2lOT59WGRcQcnnj2oK28TDBGrMLCvzvxcZRl4 lQAg== 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:message-id:date:subject:to:from :dkim-signature; bh=H6OVoJrQX7RGgK41fMCeCXgNG3P+xR1iomsErR3VVAM=; b=RqaXTcfBKTCGWsBY25jI8Y2wm5HPZgC2S+jVQW1LWaZ1zj88K0OFVDFlQz0DkhXt3A ofUCRMu6oNYbcgjLU+QEujngATVLc4y5wsPEpKe/zckqfvekbhqaoGrA+M9zBhiAvrBP CtR76M3DsfBarUYpuxyemmI0Kp0lIauyRRo/u6ieh5VG0amOdEP8C7vMg1YKB4J5JGAM G2n/UQZzboNgbzV4HF0RZImJ0OMIw0FWla+VWg0ECedFbJdnNUI4s1UBshIz4kdUsxQT 8jBiFcvVN6OSNRqrda9xNDRvj42C/BkrGTWvuumAw5OIWEqd/awGbmDpeDlG0qBg2Jzx QFUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tptGsGvc; 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 ca4si14355437ejb.39.2019.10.15.10.02.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2019 10:02:28 -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=tptGsGvc; 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]:53352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKQDK-000262-Ji for patch@linaro.org; Tue, 15 Oct 2019 13:02:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42499) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKPmy-0008AZ-Bj for qemu-devel@nongnu.org; Tue, 15 Oct 2019 12:35:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKPmx-0000EO-4p for qemu-devel@nongnu.org; Tue, 15 Oct 2019 12:35:12 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:36482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKPmw-0000Dp-Vu for qemu-devel@nongnu.org; Tue, 15 Oct 2019 12:35:11 -0400 Received: by mail-pg1-x541.google.com with SMTP id 23so12476981pgk.3 for ; Tue, 15 Oct 2019 09:35:10 -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; bh=H6OVoJrQX7RGgK41fMCeCXgNG3P+xR1iomsErR3VVAM=; b=tptGsGvcuiDdignTWCEnJsfOkpLL0mIF7qSYukBqx5kpO/ZSgPBfbQJMuhcG5+j6Cd IYJzVxNnoNWNq7kI6mVPwx/TEcb+IwiBA4FQbDo9X8RP/o/7iW/7br8byGj0OUnIOhUz MZ1aQavjk4sYDWdT6TJHy63BoL2BMA8FuWcozGHEsVHTKxbggSJxWeFk7Pd1vVIo8cfR eFsIesGghWdEZa9qRUnu2jyJu53UpOlj8kRMH2GHapngd6ptWpH4v9lu7yhIK8Lt74Ag 81axfUlVlrDXoBZJv0mbbjbLK5/EbxnOD3AGLm0B5czBMG5yMopjvYcgqKucOT8ew52s XLRQ== 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; bh=H6OVoJrQX7RGgK41fMCeCXgNG3P+xR1iomsErR3VVAM=; b=ScwfvQ9SJOG0N3oAkcMnsRzMTQb8vHo4cqgXvk+Xy9LajbWUZSPhcCbz1XKjWXXruO 1TaFpbVEk1A2NX43jPCln9/nG93wzbCRyFMhe7l+b7czea0T/WuwVVvWgLLvJUB3eUq4 LnjAX/7twYth/jxEuTQcoVMleKy3s2Bj/II6oMBpebyN9vw506hp5dmT7ARHlmBzUG6L YFxwLKZ4SoEDlGX5+1wkkpqSeZDqyBpuYNZmuSrqMAijPDOtV223nv1laca7XhSxFQVj 9KA1+ohgzX6dDEfeWU7DH1wtZYl0tmQAf4lnmh6YvMHtEivJODL4+Db62dKMRFX86sfg j/MA== X-Gm-Message-State: APjAAAXEQ6fvwLg4rg7yQ5utMvdl1oijwDTNGsyXvvUsJTCcHXeSZal7 fifHYPa0Kitm6vgHznFCr0BWysoUP1Y= X-Received: by 2002:a17:90b:d90:: with SMTP id bg16mr43937814pjb.143.1571157309569; Tue, 15 Oct 2019 09:35:09 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id m22sm22011593pgj.29.2019.10.15.09.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 09:35:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/3] target/arm: Implement ARMv8.5-MemTag, user mode Date: Tue, 15 Oct 2019 09:35:04 -0700 Message-Id: <20191015163507.12153-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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: elver@google.com, icb@rice.edu, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a refresh of the user-only patch set from March. I do not attempt to implement any part of a kernel abi wrt mmap and/or mprotect. Instead, it uses a x-tagged-pages property to assume that all anonymous pages have tags. The tests added are disabled by default, but do pass if you have binutils 2.32 installed. r~ Based-on: <20191011134744.2477-1-richard.henderson@linaro.org> ("target/arm: Implement ARMv8.5-MemTag, system mode") Based-on: <20190803210803.5701-1-richard.henderson@linaro.org> ("target/arm: Implement ARMv8.5-BTI for linux-user") Complete tree: https://github.com/rth7680/qemu/tree/tgt-arm-mte-user Richard Henderson (3): tcg: Introduce target-specific page data for user-only target/arm: Add allocation tag storage for user mode tests/tcg/aarch64: Add mte smoke tests include/exec/cpu-all.h | 10 ++++++-- target/arm/cpu.h | 4 ++++ accel/tcg/translate-all.c | 28 ++++++++++++++++++++++ linux-user/mmap.c | 8 ++++++- linux-user/syscall.c | 4 ++-- target/arm/cpu64.c | 20 ++++++++++++++++ target/arm/mte_helper.c | 35 +++++++++++++++++++++++++-- tests/tcg/aarch64/mte-1.c | 27 +++++++++++++++++++++ tests/tcg/aarch64/mte-2.c | 39 +++++++++++++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 5 ++++ 10 files changed, 173 insertions(+), 7 deletions(-) create mode 100644 tests/tcg/aarch64/mte-1.c create mode 100644 tests/tcg/aarch64/mte-2.c -- 2.17.1