From nobody Sat Apr 12 08:58:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549039289700216.45223026302858; Fri, 1 Feb 2019 08:41:29 -0800 (PST) Received: from localhost ([127.0.0.1]:57740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbsZ-0002uT-Lf for importer@patchew.org; Fri, 01 Feb 2019 11:41:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbMF-0008IW-Gk for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbMB-0003kl-Iv for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:59 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpbMB-0003cu-6X for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:55 -0500 Received: by mail-wr1-x42b.google.com with SMTP id x10so7663812wrs.8 for ; Fri, 01 Feb 2019 08:07:43 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n6sm2847250wmk.9.2019.02.01.08.07.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 08:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gEbkvGH2CG5X0C/1f7kkr+K8Nr4enwhQX5hBF7oFAsU=; b=ck0CQDPl8ozKx4WSoPvVI8JV1R4Io4eVq47xmPzvwr6UyjBDXsUfZ3OXzviV1pVz61 mZesmh6CKNqGuJ10KL+zPfl4n0KC71BBqz5EBqFeuKGpnUA0AEzLJWDxe8Z8HOCx9CFd mrxnc4KqLOi/Dda7fzdmGVPlg4rn1OdutdNmw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gEbkvGH2CG5X0C/1f7kkr+K8Nr4enwhQX5hBF7oFAsU=; b=QFN+ZB7+sorwJVKDkLHasNgLOnzkUHtkPu30Jhpz336Wj2XJSNb4SlN4KabU20nO8d Ybnqtpt77uIou9rrDENe5AHcR0Uc8akS3jbmRwPoiExH4B9DL55IwG1KTCVWIYbWz/Hr 1f24OKUD/KUOEmjUAksLtP+j8+rJKyjvSML7Ds+BjTrHWV/HqhLgf4kgLPDaMiYqxRRG cflCKIq3DbPVL4q0ClZaH12p7rqxnZaqoIerDWFkYdxxjdaDfPeh4i/SJxUjarXvIiZM v/HDn/DkaCbUNiOcQMtcjCVpxJpjfuQC4Le4ASt5VbDzTOE6jtk8yJa8J8bVgVUkX1qw WYLQ== X-Gm-Message-State: AJcUukdwVZ/7rQkSQI0ICso4kPwD1fDPhzvgkSQIcFwSnQ+cbPU90UVk 5qhUx74BvuB+sWhxuwW0fngF7ziF2Ibf/Q== X-Google-Smtp-Source: ALg8bN6bySMf0XC39sWfNriRFuBsTDwCejDH5JjgIcdlhCocCFck+gmhHFdvi/zlg1QfU9zgKY7jow== X-Received: by 2002:adf:c5d3:: with SMTP id v19mr39062523wrg.30.1549037262577; Fri, 01 Feb 2019 08:07:42 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 16:06:43 +0000 Message-Id: <20190201160653.13829-38-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201160653.13829-1-peter.maydell@linaro.org> References: <20190201160653.13829-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b Subject: [Qemu-devel] [PULL 37/47] target/arm: Enable API, APK bits in SCR, HCR 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Richard Henderson These bits become writable with the ARMv8.3-PAuth extension. Signed-off-by: Richard Henderson Message-id: 20190129143511.12311-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index e6f69180ba0..d070879894c 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1859,6 +1859,9 @@ static void scr_write(CPUARMState *env, const ARMCPRe= gInfo *ri, uint64_t value) if (cpu_isar_feature(aa64_lor, cpu)) { valid_mask |=3D SCR_TLOR; } + if (cpu_isar_feature(aa64_pauth, cpu)) { + valid_mask |=3D SCR_API | SCR_APK; + } =20 /* Clear all-context RES0 bits. */ value &=3D valid_mask; @@ -4558,6 +4561,9 @@ static void hcr_write(CPUARMState *env, const ARMCPRe= gInfo *ri, uint64_t value) if (cpu_isar_feature(aa64_lor, cpu)) { valid_mask |=3D HCR_TLOR; } + if (cpu_isar_feature(aa64_pauth, cpu)) { + valid_mask |=3D HCR_API | HCR_APK; + } =20 /* Clear RES0 bits. */ value &=3D valid_mask; --=20 2.20.1