From patchwork Thu Apr 18 15:20:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 789784 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp622889wrm; Thu, 18 Apr 2024 08:21:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWs252mmbBTqM1qy1Zq06voyCTFZAk+FVm7fP9MajSuBLMfJypcbFrKegj0hcn7NlDr3unI3zfV3JiJHD70avjY X-Google-Smtp-Source: AGHT+IFw9Lx/6NsHiXt+GdwujNtK8FX1IXXyS0E/4jDev6eVBGomX1Yzxy3M9E0XGdSEh9v5OkNz X-Received: by 2002:a05:6214:1fda:b0:69f:793d:cade with SMTP id jh26-20020a0562141fda00b0069f793dcademr3396608qvb.19.1713453695571; Thu, 18 Apr 2024 08:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713453695; cv=none; d=google.com; s=arc-20160816; b=zl+H8URcRGr58FdjBHWK34gKBExJgdqo0kauCD+OS0OiSxi2FSPRw5JN0Gz2bJOp6s c1KPWfUDL0I4CE3mXuaffg4EVXIGHVwtZN74kh+ZiaeOkwWPnFq2/FXrL2vQAd47jU7Z 7tGKSD/X4wndGPmxltzR//k8Sf+XF+LJ6Lo2/iAbK5dSGYeuNlbdbE2unPrOpdbv674+ BPJLxKOzOmLk67G5KxegKuPmrpg31z+AJAdDIVFIXjt6im3LD5pO2ZPguJHl78KqE0ms UtTWIdc5ZV6xaEdZYsgr/5WxjA5K5tYbemzcjB2YJC76e59uc3xPN13hWqJxy38/6vjW Ti6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=LjzFedX8f7dPOTCE2RgQfLW6VZSYCvlcrFVxlukFK5w=; fh=FTXRcZSgqBEdpn8g0v2/Zpy2Z9P4VEtGTwhKbCtOSsw=; b=KM/a/ZB892MSHaiH/ObGH3Y46gzAWq1Gf5B0EYE8Faxt3nHu6hlf02nLeZ9/nNo3E+ LaU1o5Ukz9oGo0NubswXEjDxmESoZjrq5BVVKYDCIGzzkFGz4gljcthSexqy32dcU9sM 9eonFQxVyxfEqEhfYLkD/9NSGGaMDpIz3brR+dZugAdphkw8FOhZGJy2p0jj53QXA+rj 7w3OQIMdhwIt3wqOrLZElc/6OJKQjg1aWLQQ8zBxQXzJFpdu9vToAPcjRxXdGauQ58ro wF8nj9/Dt61EI5RUzgPB+u3lKxnrg5t0q744cbtm3+tpjCD1BqQkeEFplQVVO5R/Jb9i mH7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h/c9CpRD"; 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 8-20020ad45b88000000b0069b240e2c39si1575813qvp.576.2024.04.18.08.21.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2024 08:21:35 -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="h/c9CpRD"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxTYo-0003HM-71; Thu, 18 Apr 2024 11:20:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxTYk-0003Fo-TF for qemu-devel@nongnu.org; Thu, 18 Apr 2024 11:20:23 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxTYg-0004XL-Qo for qemu-devel@nongnu.org; Thu, 18 Apr 2024 11:20:21 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-346b96f1483so597190f8f.1 for ; Thu, 18 Apr 2024 08:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713453608; x=1714058408; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LjzFedX8f7dPOTCE2RgQfLW6VZSYCvlcrFVxlukFK5w=; b=h/c9CpRD8tVhvI+wzfQwbDVAq2aX8pu8nnHQp4OKp9vOF456TckJPuzkfk4l93oQzu j4iPN/vWFL8sQuwDxI8ggmMGW1enE2lRxxO3jBNZrc4d6bfxwvmnYXOCpRdsG98NG2TL AX9Fr378wRVF6sBG9oY8YNJgvgZFAuYBLajBZ9L1deD+VT37jFYF3IaF9FmdYxMQh8uk 3DPQYEKDCzU1gPvJi70R3guCvENMCKPvY5+rwlZn/mSb2iEa5X+1UG0rzuFOzald3zgD vt+gzRhLn3PS9GKEorez1RlgnUC1V4VBeuioSAfEXYGW1bEx9yoAFTz7Tf7Jhm/kfYlQ o0MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713453608; x=1714058408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LjzFedX8f7dPOTCE2RgQfLW6VZSYCvlcrFVxlukFK5w=; b=MhKTigXyDW5fybpzuSQii2QvCzGuMEJeksIXncWQ6F7nrZRiMmJvnn0Kz2YInEAU84 0CuysQFERumN9ob1q0rJ/bV5lhbU96sBRyapasGkpOpiN3eSAokRPXsLQwdCBOCutJHN CYmLPQKLQ8/cZ0vx8HJmX7FkJzr6bcin6ZJ3QdGwsJFWAJyarVXYjWFaFkLQAa0BOHP7 utbfBXW+QbEwsXxv5+6FWEcc/dMVZk+2QA6XiP6HPfiq3cN2NeaQS09JkRnS6Z5DpEMz nUKS1dk7J9q5UO6HKtTiv72hqIuyJdB/OJt5hjaP1AQXoAEiDdj0CrENjwyUMMMis/Jj bNCg== X-Forwarded-Encrypted: i=1; AJvYcCWTWf6sKQeMVRvHI1N9ihGPxPbeYu/URP/V5JSOWPWuVmPIP/lB5A9QcE50XEASEkAnsoiuuoXIHHU37j8f8ZL31omFRTU= X-Gm-Message-State: AOJu0YwgSK0Pr8Ay2ER2qF2sA1zVtow913fSUvPbPeTh6/FtDAXkXND4 jeQSj+S6g6Sqq74p3ojoUucN7bKSqeROvJIsxGRDmppkeSKxz0hYeRjGNY7DMOc= X-Received: by 2002:a5d:595e:0:b0:343:d7fe:96f8 with SMTP id e30-20020a5d595e000000b00343d7fe96f8mr2154243wri.19.1713453608118; Thu, 18 Apr 2024 08:20:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id w17-20020a05600c475100b004162d06768bsm6886839wmo.21.2024.04.18.08.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 08:20:07 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 5/5] target/arm: Enable FEAT_Spec_FPACC for -cpu max Date: Thu, 18 Apr 2024 16:20:04 +0100 Message-Id: <20240418152004.2106516-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418152004.2106516-1-peter.maydell@linaro.org> References: <20240418152004.2106516-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org FEAT_Spec_FPACC is a feature describing speculative behaviour in the event of a PAC authontication failure when FEAT_FPACCOMBINE is implemented. FEAT_Spec_FPACC means that the speculative use of pointers processed by a PAC Authentication is not materially different in terms of the impact on cached microarchitectural state (caches, TLBs, etc) between passing and failing of the PAC Authentication. QEMU doesn't do speculative execution, so we can advertise this feature. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index de39110692b..fc616e48d30 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -60,6 +60,7 @@ the following architecture extensions: - FEAT_FP16 (Half-precision floating-point data processing) - FEAT_FPAC (Faulting on AUT* instructions) - FEAT_FPACCOMBINE (Faulting on combined pointer authentication instructions) +- FEAT_FPACC_SPEC (Speculative behavior of combined pointer authentication instructions) - FEAT_FRINTTS (Floating-point to integer instructions) - FEAT_FlagM (Flag manipulation instructions v2) - FEAT_FlagM2 (Enhancements to flag manipulation instructions) diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index da15182595b..c3369f40824 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -1216,6 +1216,10 @@ void aarch64_max_tcg_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64MMFR2, E0PD, 1); /* FEAT_E0PD */ cpu->isar.id_aa64mmfr2 = t; + t = cpu->isar.id_aa64mmfr3; + t = FIELD_DP64(t, ID_AA64MMFR3, SPEC_FPACC, 1); /* FEAT_FPACC_SPEC */ + cpu->isar.id_aa64mmfr3 = t; + t = cpu->isar.id_aa64zfr0; t = FIELD_DP64(t, ID_AA64ZFR0, SVEVER, 1); t = FIELD_DP64(t, ID_AA64ZFR0, AES, 2); /* FEAT_SVE_PMULL128 */