Message ID | 20200623193658.623279-5-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp2275360ile; Tue, 23 Jun 2020 12:41:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdGiyzzzKDMlDlDY15kWwFohn1HF42eS2CF3T8Tl77ioTz5aUrtbPm9J3LLPA2Eb8XBy4p X-Received: by 2002:a5b:28f:: with SMTP id x15mr38223599ybl.335.1592941296998; Tue, 23 Jun 2020 12:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592941296; cv=none; d=google.com; s=arc-20160816; b=RCoijr1C0aVuaIsm+O23EQcBy2my22dqiunrSD/kchKLj5wQCPaoPLcfy705R13nvU s6zdfWcjVdIUHLAB2g4TC3a26c40V8CSr+UEVX25rhWJajYUHGsR/nsCQXt3bpaNBM0K UjJfKL3LNUXsNWwo5bFlSOwnNBEOlNr/8fPOkdM/1Zkn0yjeKQHm+U96OP7FpoVTnkRk 4QrBgvJJ7TD5D0RsbM4fpEqZGRadsPNbGuOBXtDw11nMEoWlSF7aszLY8uHu0Ix5tC/Z K4wGzUmj4GKKZPQpCCUSqug+7P5/sKH5JXOl8iMqObDgnzu57XpBwj+to/Q8zeaoodbh wTqw== 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=AlIgM6p7oAT+zID+rk9BPqh6DFQ2CZ3GNfJxW/eCI2s=; b=MuEev38oBIhmTjNWkRQX0oADj/FCux7TJ0FnfMMlukHdR8j5c0tN1zAoc3Zt8IjDWU kjTkz52gmgZp9HlVHJMWcK1fu1nKs9m8xZWMkGRGEFMUzJUjwiORTb1T+QutUbfb+7LO pzlg/GVEiWEHAfkyn9ETVKj0/oAIaHFhzikpYSDxEyzyzT5bReiqkcmjaQZ4wnOF0Dkk XXeaGA7UFm4Wa6g7LF3aSNMQVCNXQAx4ac1VuI/V6FT3T/B8pchyZ/GV/8UeYV2kJvbh XpVtsYfeML0A+LX1OmK0jpIgaPbR/yoQXWURQ/7lcwiES//a0mGnkILFeW7I8khQLssM 4SRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=c0wevK6U; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r7si20235786ybd.373.2020.06.23.12.41.36 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jun 2020 12:41:36 -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=c0wevK6U; 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]:35250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1jnonY-0003LG-F0 for patch@linaro.org; Tue, 23 Jun 2020 15:41:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1jnojF-0003F1-I6 for qemu-devel@nongnu.org; Tue, 23 Jun 2020 15:37:09 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:34877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1jnojE-0005WB-0L for qemu-devel@nongnu.org; Tue, 23 Jun 2020 15:37:09 -0400 Received: by mail-pg1-x544.google.com with SMTP id f3so27246pgr.2 for <qemu-devel@nongnu.org>; Tue, 23 Jun 2020 12:37:07 -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=AlIgM6p7oAT+zID+rk9BPqh6DFQ2CZ3GNfJxW/eCI2s=; b=c0wevK6U65i14/qwTuSTYORUsvxx1u0fzHDtfuQM6yEuMT4D1BU91SuEDKZ6IHZnDa Dl7+T8tHAlaoJqyz2B6ERtTzubUZS296aY6OTRRl7ckZyb5u1VCMT7Z80lBD33jvTjFh hgwRjfU24w2NDUR9CtfBL9kWjuYAftZmvV4WBRNA/qO959qUF63Rgw/DJXs76qMSLpDI V1qtS6f5RaC69EjJ22STz5E5AzMvsUIFHyWAX4g23CtPd3X/YRklt5dC6cKJRzM9lm1U A5MWXvVLMVBHT9UAO07ZMbnXPqVKl91/CjxizK/QriZ1ZcZ+9ek7iMHbdM+gOaQiTc4T WGNw== 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=AlIgM6p7oAT+zID+rk9BPqh6DFQ2CZ3GNfJxW/eCI2s=; b=HXEQzzzZOAu5a6GFE+uqjRfnDmpGAfBe21XKy6KlInYWZBs1UTJEtzA2237wTOzfca aJea/6RCXuYD+dBoiA/08wqxHUSnp8egvGZhWWfFQN0BnrhXosHgoBKBDia4wiLycEHL f90Zjvv8KvQtukPujjI45f/dL0FyCvdxuHwjLr5lTjO7Ib/qVHhv7g68a9cEX71KnSnI jprwWPBBRcHMgQ0Y94hULDPbii/0+oQDn46vDebVblAByDjt+W2+ic5Fn4hdIjBjfOiy tp62K1po0iDMnz7AJUaDSZ/A+Kz6fKA1WarzOaE4ylTsD4rhon6ivs1kgaLc+bxaGy+h RgGQ== X-Gm-Message-State: AOAM530snFrkwzS5cLlsP41CF493B82T0PlnXzSONm5/SY24XQcKmvJr u+gXsAcJUCozj3gtV2qTv5ZHJbkO7EI= X-Received: by 2002:a05:6a00:801:: with SMTP id m1mr26967413pfk.200.1592941026133; Tue, 23 Jun 2020 12:37:06 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id p12sm17927642pfq.69.2020.06.23.12.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 12:37:05 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v8 04/45] target/arm: Add support for MTE to HCR_EL2 and SCR_EL3 Date: Tue, 23 Jun 2020 12:36:17 -0700 Message-Id: <20200623193658.623279-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200623193658.623279-1-richard.henderson@linaro.org> References: <20200623193658.623279-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x544.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/arm: Implement ARMv8.5-MemTag, system mode
|
expand
|
diff --git a/target/arm/helper.c b/target/arm/helper.c index 8a0fb01581..d6c326b58e 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -2021,6 +2021,9 @@ static void scr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) if (cpu_isar_feature(aa64_pauth, cpu)) { valid_mask |= SCR_API | SCR_APK; } + if (cpu_isar_feature(aa64_mte, cpu)) { + valid_mask |= SCR_ATA; + } } else { valid_mask &= ~(SCR_RW | SCR_ST); } @@ -5248,17 +5251,22 @@ static void do_hcr_write(CPUARMState *env, uint64_t value, uint64_t valid_mask) if (cpu_isar_feature(aa64_pauth, cpu)) { valid_mask |= HCR_API | HCR_APK; } + if (cpu_isar_feature(aa64_mte, cpu)) { + valid_mask |= HCR_ATA | HCR_DCT | HCR_TID5; + } } /* Clear RES0 bits. */ value &= valid_mask; - /* These bits change the MMU setup: + /* + * These bits change the MMU setup: * HCR_VM enables stage 2 translation * HCR_PTW forbids certain page-table setups - * HCR_DC Disables stage1 and enables stage2 translation + * HCR_DC disables stage1 and enables stage2 translation + * HCR_DCT enables tagging on (disabled) stage1 translation */ - if ((env->cp15.hcr_el2 ^ value) & (HCR_VM | HCR_PTW | HCR_DC)) { + if ((env->cp15.hcr_el2 ^ value) & (HCR_VM | HCR_PTW | HCR_DC | HCR_DCT)) { tlb_flush(CPU(cpu)); } env->cp15.hcr_el2 = value;