From patchwork Fri Jun 26 03:31:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191804 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp118436ilg; Thu, 25 Jun 2020 21:03:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydP6vataCZdEblgZbMogmDG7bc3SMUEYBhDRQ64CmaabkOjcVqa4BDzBBwzvD4g7K7Uypi X-Received: by 2002:a25:c507:: with SMTP id v7mr1758345ybe.306.1593144239741; Thu, 25 Jun 2020 21:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593144239; cv=none; d=google.com; s=arc-20160816; b=J6b2QCQGKpO8Xq6IXWK9yNcSUUfDEAHM1l+6Nh9gATq8x30Q8jWMdZ5PbyDIUt2Uiy 3gBi5mjHPVUeIE5NnkBlLiyJpLJirUfBtwvRdlC06319PVJ9feFsV0qSr39s+8faFqNS UnL15aNLORLfQWpq8rZ+XOWYUbkWWqXmPmRM+wonNCA1pkWsL2ZkY5o21dQ512qC0r6P VLVbke+6Ft1enX5ktEsSQ+aFXNi7tdp76CaXJF1rZgqxnQcd0FRKiNpnMa+1Og4vBkrc r5Aa6Pr+b7ogmrvO39VHL/hSvaJEHuHeavfGc44/DdSu6x4m+mnu74ucNnxROqoc/0D/ sStw== 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=8SXI3lbgZ0UAYQNgtyM7Qe9sZGMnhZE8cWfw/l5JLCg=; b=HlI5xSwGlyrB6X8K5rVd0MUys5eXdDo84snDYgmW4vHpwmvfz5kmH6R2FLb/oLXrhd wOpKT+4hMbrHe+UIY/8XNEvngIrJ986WJWohzBvAoB1TyxJFL0BqZQFXfeLY89si3r3P 3eBUknRnZzqvKJLVX7D9yjS7xO1asUEsVZLflf7VxmhaZe78neVBW9OdjmhMLZy83BMp 8WUoh252LkPfJib3IgV+TLPRQ6bLGHmfcPVpSXfWeQh9zZ9rkuR4cntF/u4scAC4E02p wKQIgRs1v7mXJfOwyhhsVEnQQon275rzNJVnbuWFglEOeLzMAeud0j62AwRh68kO8Zi9 3uFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RvnyuXDp; 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 l6si22624489ybk.260.2020.06.25.21.03.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2020 21:03:59 -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=RvnyuXDp; 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]:33952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jofap-0007my-75 for patch@linaro.org; Fri, 26 Jun 2020 00:03:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jof6g-0001Zh-4T for qemu-devel@nongnu.org; Thu, 25 Jun 2020 23:32:50 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:46455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jof6e-00029a-LN for qemu-devel@nongnu.org; Thu, 25 Jun 2020 23:32:49 -0400 Received: by mail-pf1-x442.google.com with SMTP id b16so4033616pfi.13 for ; Thu, 25 Jun 2020 20:32:48 -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=8SXI3lbgZ0UAYQNgtyM7Qe9sZGMnhZE8cWfw/l5JLCg=; b=RvnyuXDpI+gKZktcyestmDB7I9NQqDabkurOrmxomrmouuZbHMaA5ocFxOB3UhHANY qNAQtKf9amHCQUuaZ1iuY39WZ5GlEpfOKRnsYbb0hm4wMiFqFPsJrdDqF59MVvBR18+D TfYy8Sv262IQ/ymkMugQIU9b7vubFzs0cUoeZl/cbbKbhazi0yP8VP/hwCzi75+EbsRq pvs4CFtW77f5CJgkqoItQPQqPQtqF732F/5yhhxnUcMOvr8ImxeONw7bf8ptAkqhR6Sd IefYuSnw5vcPSS/M97+IlkIah2w8Dfriatgqqn3pR5T7C8lLIaK10tR/ObKDBiFAmuJ8 NIVw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8SXI3lbgZ0UAYQNgtyM7Qe9sZGMnhZE8cWfw/l5JLCg=; b=KSTckJEiKuY/nQ/+w/PtzEJqCVPYYnyM6q05tlw/Fo1tFCPTjWjTrF/ljGL4nyS7sG ZjEamE/O7y3UAlXS6NLp8hKLCy4rSTA3p/xMaFpEsArmENzHMDG/36TIQ1IEvV+bXnoZ Zq/NCndJLoAUgE/5+cSbBNKZ1WoffBVJAt4qwkPrHiRdU3xW0A4cGFSxVq49k7ECF/FB K13NZORyY1yrwL4IrPAEwkXjuhb1qV+waxBtvoqwZCKXlBYutR/EfMGA63u1vX0TBJxq i7Nv5COl6/paxvB05CLFWR26sS/ygxF3sLtxdm8Igs3qYhMt1ZlbTfVsNUmA05YaT62H +nBw== X-Gm-Message-State: AOAM532wD6QJ0Gba6LLfIfwQJ0P16ecN0cZvG3yOsxEh5OGfrqHse//K nCVyRv33fh383tTXaqFj5UrBBxZFWzU= X-Received: by 2002:a65:6393:: with SMTP id h19mr911005pgv.278.1593142366938; Thu, 25 Jun 2020 20:32:46 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id y27sm1605256pgc.56.2020.06.25.20.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 20:32:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v9 45/46] target/arm: Enable MTE Date: Thu, 25 Jun 2020 20:31:43 -0700 Message-Id: <20200626033144.790098-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200626033144.790098-1-richard.henderson@linaro.org> References: <20200626033144.790098-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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: peter.maydell@linaro.org, qemu-arm@nongnu.org, david.spickett@linaro.org, steplong@quicinc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We now implement all of the components of MTE, without actually supporting any tagged memory. All MTE instructions will work, trivially, so we can enable support. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v6: Delay user-only cpu reset bits to the user-only patch set. v9: Add some commentary (pmm) --- target/arm/cpu64.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.25.1 diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index a0c1d8894b..a2f4733eed 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -654,6 +654,11 @@ static void aarch64_max_initfn(Object *obj) t = cpu->isar.id_aa64pfr1; t = FIELD_DP64(t, ID_AA64PFR1, BT, 1); + /* + * Begin with full support for MTE; will be downgraded to MTE=1 + * during realize if the board provides no tag memory. + */ + t = FIELD_DP64(t, ID_AA64PFR1, MTE, 2); cpu->isar.id_aa64pfr1 = t; t = cpu->isar.id_aa64mmfr1;