From patchwork Thu Jan 10 12:17:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 155136 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1831981jaa; Thu, 10 Jan 2019 04:21:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ptl+RUN5zt5ibX8OczyIaS4BvGf1ELmnBagrlPBT8dxDX+W4mP0aKL2d2qew6MYF5gv4Z X-Received: by 2002:adf:fb0d:: with SMTP id c13mr9855934wrr.285.1547122880454; Thu, 10 Jan 2019 04:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547122880; cv=none; d=google.com; s=arc-20160816; b=00Q2VAiNkSDrU/P5cHXqZoHH6LTVV77D10N0cr99/XbIy8AOHsk0tWTQrev7BHPddA kyX81wt8lvfnXpkfrhLwrwUxVkRbPhYHFE/TsZPXJsHwSBflhB4Yf/e7aLD3P+eUH8QC ggZ1AY+HGUeIcXIPpU5p3zy6TZwRD3mKWEFvtOFt8VCrK56Pn2PpuIcQlw8rINELU/GT palRkVIqVGl/84/oKLVWvFIWf/gVmm6ay26PQxi6OnZYPUPHsrZk2+yG3XRIdVRAk2eA rUhnG/t8aFbZpNuPeA7StRhKDPP+mxtYGSaVCRIWM07V8ETtGAtBGCZEH0PbHprxArIJ Zr1A== 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:subject:message-id:date:to:from :dkim-signature; bh=0S4OPmVvyr0oRJ5pmHcnQvZulFKg/oMtFj35xVKmPVw=; b=Ci7UzqHZ5ZJkEpqiHxXrTqATBW+xFHugUcEJL7Nlys4ILQzyisEmpFQBh7YDQMEVP0 ui4H85eVx7Cy++IWFNLqWCXzEE/KqdCffbrg4EgOOl2jjQEYHeZDzI0LxQdEKqPqVWTJ N+bi8A+9qypcmAlzEwfgqij3RZcqxuFnvNvW3PQg/L0V8RaPamR6PCsBmHdyhT/B2xxg kJiZciVR9T1XWkgMgXmh3TsX+lC3AVwDa72Ekk8xohJsY2VT77wrAU/BWPkzlRsZOYhg Am96wFl4i4D/vLSD7SGt+F5/D2bVUTpDfFMzwose4Kd2rgQSyRiz61WTFbYA2qqsSGQT ZgZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WpyAWv0R; 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 n20si10879157wmk.42.2019.01.10.04.21.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 Jan 2019 04:21:20 -0800 (PST) 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=WpyAWv0R; 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 ([127.0.0.1]:56661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghZKp-0005sh-8Q for patch@linaro.org; Thu, 10 Jan 2019 07:21:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghZHQ-0004Qa-4a for qemu-devel@nongnu.org; Thu, 10 Jan 2019 07:17:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghZHP-0007Sk-Ax for qemu-devel@nongnu.org; Thu, 10 Jan 2019 07:17:48 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46077) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghZHO-0007QH-EH for qemu-devel@nongnu.org; Thu, 10 Jan 2019 07:17:47 -0500 Received: by mail-pl1-x642.google.com with SMTP id a14so5099025plm.12 for ; Thu, 10 Jan 2019 04:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0S4OPmVvyr0oRJ5pmHcnQvZulFKg/oMtFj35xVKmPVw=; b=WpyAWv0R0sETvwMqOiBGk+6SgV8BdkO5kJHmPsTk8/iJkcl/zJv0c/pg4t6gFT7Txp 8tSRyxNHCQexvY+IE6FUgI3jOPR9knjFATHngxSqMUr53nMu4pMTrxzcMPZoN15QTnPs CZE/yhNLSXIOzEtzXECjp7j7NAr4gHwcalj5I= 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=0S4OPmVvyr0oRJ5pmHcnQvZulFKg/oMtFj35xVKmPVw=; b=B8SZOEyUorVZROtz2I4nqEFzXOee9aF1nF46gmJWHOfclNZiCcF6+jPML6GKttOknL xRTJhM/2bMNtlFRsG0Qol3rirN4FCqdWCttcAimXIEV4gQDaTAhgloEoDArnbvrxKAFA lu8d398d5uey5RkAjH/mFirZbRuRwdbiHj+1c0YYma+CEOxkSJSijFJErkRsP0CHJ58U RPvm/CcBGtQtLWfspdSeJNUH1DD5zcJf0B4iqvw2dN0Z9201tII1IH69LK5uwXzdv3Vx bT1H5TK1RZKJ+JM9CO/tFEgp31s+sdqg8ggjk6Bp/oTXCjWHPN0t/uMq3sd33xs4A7LK wIrw== X-Gm-Message-State: AJcUukfqsPnO/2SJS55/UHZ/c6wR6dM0l39n7ch8HOIOaS4FLIAoGVHu Me2+lq8Utxlsc3iHbt6VLONDS78QMC6Nag== X-Received: by 2002:a17:902:6acc:: with SMTP id i12mr8008207plt.148.1547122663703; Thu, 10 Jan 2019 04:17:43 -0800 (PST) Received: from cloudburst.twiddle.net (c220-239-117-135.belrs4.nsw.optusnet.com.au. [220.239.117.135]) by smtp.gmail.com with ESMTPSA id h74sm140934699pfd.35.2019.01.10.04.17.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 04:17:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 23:17:25 +1100 Message-Id: <20190110121736.23448-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH 00/11] target/arm: Implement ARMv8.5-BTI X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The branch target identification extension does not yet have kernel or gcc support. It should be in shape for developing those though. In system mode I do honor the GP bit from the page tables. In user-only mode, there is a way to pretend that the GP bit is always set. Further linux-user changes will have to track the ABI that gets developed. In the meantime, provide a statically linable make check-tcg test for the functionality. r~ Richard Henderson (11): target/arm: Introduce isar_feature_aa64_bti target/arm: Add PSTATE.BTYPE target/arm: Add BT and BTYPE to tb->flags target/arm: Record the GP bit for a page in MemTxAttrs target/arm: Default handling of BTYPE during translation target/arm: Reset btype for direct branches and syscalls target/arm: Set btype for indirect branches target/arm: Add guarded_pages cpu property for user-only target/arm: Enable BTI for -cpu max linux-user/aarch64: Reset btype for signal handlers tests/tcg/aarch64: Add bti smoke test include/exec/memattrs.h | 2 + target/arm/cpu.h | 22 +++- target/arm/internals.h | 6 + target/arm/translate.h | 9 ++ linux-user/aarch64/signal.c | 4 + target/arm/cpu64.c | 22 ++++ target/arm/helper.c | 28 +++-- target/arm/translate-a64.c | 196 +++++++++++++++++++++++++++++- tests/tcg/aarch64/bti-1.c | 61 ++++++++++ tests/tcg/aarch64/bti-crt.inc.c | 51 ++++++++ tests/tcg/aarch64/Makefile.target | 7 +- 11 files changed, 397 insertions(+), 11 deletions(-) create mode 100644 tests/tcg/aarch64/bti-1.c create mode 100644 tests/tcg/aarch64/bti-crt.inc.c -- 2.17.2