From patchwork Thu Mar 12 19:41:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 184505 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp952380ile; Thu, 12 Mar 2020 12:44:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuLUIBLbfLfOt507p1IL16wIexXnLk4jjaiZEDrIWRRLn0dUpwRnbawifDvcQgCwrE8taTf X-Received: by 2002:aed:3fa3:: with SMTP id s32mr8800568qth.10.1584042277498; Thu, 12 Mar 2020 12:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584042277; cv=none; d=google.com; s=arc-20160816; b=RH9o3r2FX5kTqFwso2QQXQlXC9JpohfP9ab3Hvii0pdJW+1ESjh7uJ+Xja3NUbUYSH UP3T012NFQxCvYyistf6xSfk/GKsH/EMAmtZR0Ce6JzGETBMwGXAeTHGFXtpZaUnV4MT yRWSxWwz1iV68o+Mku3ApUoPRvGI+0NWygqqfS41C532UgbqcQs0/mEzJZGtw3xI0cc6 OOqAwDGqy/2/ECbjNWUeSi5zwD12++LXBOqSVLHMO2KvdHSZGF5Glx10OX1gC87eEEfZ KTpjmliK9jVXBYAcpd/dgnaFgR7xW/yFzrpnezAT8LieIAYfChuupUlsVBeoNg/cLRER HEdQ== 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=TuDXY8WtYwDto50sdZbxkvATe/WJ3RvHtYzcjTWxYkY=; b=zxqGZEIYmHrpbh8n9pAl65URX0gZ6UKQCGkxDYoQ5Df8pxFT4CS3ajNFImdwOwzb/b oiZNwUoSHzuqoFyfRVGp5nhYNyFFoPhnOeK7QwSrzVfrrTr1Ojm6DnIBb4T7GInDlFke EhBTqYJxQzFD02rNY69q66x/Jgq+BiIz1a5dPfAbWhAViS9hjNoc0o+u9xA+WkVrgTvJ G09CJ6OSHFwIo0fK/YVZotEqZrPAIzSmW83SxI8iOoMIS/6hZd5JBlxxU7j1yd1cDsXS W5kk0YOK/aREGE/4C+HpD51loHobvX7VXAOlEXCzgfhchWu002Yucom8qLS5CyDvycC2 5scA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GnCf108v; 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 n8si3394962qtr.208.2020.03.12.12.44.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Mar 2020 12:44:37 -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=GnCf108v; 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]:49152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTky-0001YJ-U8 for patch@linaro.org; Thu, 12 Mar 2020 15:44:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45032) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTiu-0004gI-Jz for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCTit-0001ix-N7 for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:28 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:41397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCTit-0001i5-ID for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:27 -0400 Received: by mail-pg1-x543.google.com with SMTP id b1so3560891pgm.8 for ; Thu, 12 Mar 2020 12:42:27 -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=TuDXY8WtYwDto50sdZbxkvATe/WJ3RvHtYzcjTWxYkY=; b=GnCf108vR5bX8LMMRe1xZP8IiaNC8+YrInhj2riL7OZFyjXFPfrfryeFWlC0GsQc1P 5JAY/4xxvd9L4+u5JnLzwCbSVlgaerxGns9CPOccrHpgKCOQocBGhLJGB6oMrq08SkgE Hq46ASe9vFeYP05uo3U6MRSGSA/MIxKNAKMOpuP7zC+GAQcWTkTXW8PrU2f1LR0Xvm13 g2MOxIoQiXt6M0aYECg6h/3iyFGNuDlwaqrIe0WB/qlGkTRRH7b1vrZ/rM0bs9z8wjUp gzyKX8Aj2NVGwweA/86iDBiooG/N6hG0s6kV1RGpfARoFlAwLTs65OYJTa4YXsnLqBOZ De9Q== 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=TuDXY8WtYwDto50sdZbxkvATe/WJ3RvHtYzcjTWxYkY=; b=ejykjtp210OsSdpbvjG3CAhjyvDwb1Q60I1L1Ug/EwHh4/qDOMrMbZc9SluwuoHCJQ JNnx9bupbrnD5QyZdsgmDal5iDuqyq4+UktY/liaVIx6BADoRDvHrzX+Lw1AMx7P40SO 1AmXIYJdI3omC3aozK1uPIIq9uijOeKjG/pKes49WQvHXmJmaV5RqcjNf4utSsWYpNmc KIndARGYHLJYq+/cRvu2ASl7WGeFiXYCbXMXfRIZ7gXf24wvTVIFpSkk/ftAOoyFIJOh EP2D32KIO5RXAdRWYqXZtlPNS12ffa05Aestr/b9WMX7VktitrrWQFL5NLEgmUCbfQzu GTcw== X-Gm-Message-State: ANhLgQ2A3bC7UzjtAExAEVik0JkoW1w2l2XS+53iMAUWoKQtW+wZqTNV InE92Lt12/TTPhw5wAQOKqY8Tkg9J6w= X-Received: by 2002:a62:750c:: with SMTP id q12mr7435234pfc.304.1584042146229; Thu, 12 Mar 2020 12:42:26 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id g69sm6824842pje.34.2020.03.12.12.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:42:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 04/42] target/arm: Add support for MTE to HCR_EL2 and SCR_EL3 Date: Thu, 12 Mar 2020 12:41:41 -0700 Message-Id: <20200312194219.24406-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312194219.24406-1-richard.henderson@linaro.org> References: <20200312194219.24406-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 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, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index 97272502ce..b9267ddbc2 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1976,6 +1976,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); } @@ -5238,6 +5241,9 @@ 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_TID5; + } } /* Clear RES0 bits. */