From nobody Fri Nov 7 18:46:50 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548774387614959.4216613371656; Tue, 29 Jan 2019 07:06:27 -0800 (PST) Received: from localhost ([127.0.0.1]:50716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUxk-00021r-EY for importer@patchew.org; Tue, 29 Jan 2019 10:06:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUqh-0006Aw-MB for qemu-devel@nongnu.org; Tue, 29 Jan 2019 09:58:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUUD-0008C4-TI for qemu-devel@nongnu.org; Tue, 29 Jan 2019 09:35:47 -0500 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:33719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goUU7-00088A-SO for qemu-devel@nongnu.org; Tue, 29 Jan 2019 09:35:37 -0500 Received: by mail-oi1-x244.google.com with SMTP id c206so16334541oib.0 for ; Tue, 29 Jan 2019 06:35:26 -0800 (PST) Received: from cloudburst.twiddle.net ([12.227.73.85]) by smtp.gmail.com with ESMTPSA id q131sm6393758oih.1.2019.01.29.06.35.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jan 2019 06:35:15 -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=qcobqzIOzPYOj/qnGGoVYlFYLozoBssIQjFq+1fWaIw=; b=itTfpboZ/q8V/JVBgEpLJKDjeHhUZC7f4tuq8gMrrIYPJ12qWMJOvfmouaXD2t7CLH PnFZShssGSeEdWWlEWM3XYeZe5KDxps95eLL97Jd+8LFGcCfYH+cd2nVqFKj4I/Ng+wz A1v9zrDisHCLoFZgMBuL1gUK63UAxR2/e7zUQ= 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=qcobqzIOzPYOj/qnGGoVYlFYLozoBssIQjFq+1fWaIw=; b=kolI/oONZ+BUxuygxLf+Y79Zh9NKtzt97GIL0KtwaLdDp77PGO/dWPzjGM72gnckUi CdRyyPSLdQm9t4tgb3WFS0rxIA1thKACvyrmvsiQYSV3QoYWwUEf0nNtBrOp8B/fxstk kQRHWX1J6wC4xIEDgiN4PpivjheJakRIFiXcfvih6dSvZm51FmEwVnsf3sOYH+dIZRKm EQGK+S4NMRGuTTS9fVKVgNBeyFmfY0jgGVtemjsuBCBtPxVDr2jh3pjjt6gN3O9BoSVJ 1KUbRZ7MyXmp3vcYH49vZIqC+bqOHmDgYrgbitNOu7ct43nLfdbk+L9NiZuXyp06lKuS 90Tg== X-Gm-Message-State: AHQUAubS1W6RGgaP/oQ6+uTDzF766YBkg37BQi5++XN9MJs8Hdpmcg4H WjyLysyAvUOEiBTnh0ZxpVP4WDcfqic= X-Google-Smtp-Source: ALg8bN7kiW7jeeu8YzNWOw86TwIIyrIWAID4IRXkz4eZQGBH2lCgOEVH+M0Xv2DwwnlwQNXUS7udmQ== X-Received: by 2002:aca:4b48:: with SMTP id y69mr9773773oia.200.1548772516382; Tue, 29 Jan 2019 06:35:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 06:35:11 -0800 Message-Id: <20190129143511.12311-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::244 Subject: [Qemu-devel] [PATCH] 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: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" These bits become writable with the ARMv8.3-PAuth extension. Signed-off-by: Richard Henderson --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index 70277222da..a1a2ac7d06 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1747,6 +1747,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; @@ -4444,6 +4447,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.17.2