From nobody Mon Oct 21 12:24:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XXDyJ1L7Hz5YwsB; Mon, 21 Oct 2024 12:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XXDyH6N2Nz4Dn6; Mon, 21 Oct 2024 12:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729513463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX2g6YyoVovWu2wZFtWOTrRg3p4CKQidLnYY8NfEQi0=; b=t2UlPs3N4SL12iNvqaKtbCCBnj/YvF1Y2pjHfTYLC6avD/8HVO9KSCM3TjESLpHXy+1I/c PuNYnKvy9FGJBiM4UNMv+k0qwVFhW41vMbulnhmGWyvGIZMTi5ls13srMande6ncAGbg1w h5rLttYdssloHswCfzv5dKOTgtHFiimTqedmj4kgHAS5ecG83kJUlhiK7BmtJHZO+CK4qS UN6hY3mjXZTHk3kS+jVfu69Nr1isfIKwwc6ZSVZG6+ZuMUgfr1Z/JuixaSxwQlWjqRvTM3 hTcdNRgpSAhjOchs7DNy3w+4KCrNOwvaOEORzeNxIpKc7/ul1cgdRZS1gQkFug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729513463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX2g6YyoVovWu2wZFtWOTrRg3p4CKQidLnYY8NfEQi0=; b=k+z1700kFk7v5gvstpZudMrYH/7ePd7qLzY8VogMIjnfMccunTk1kRp2TtpSm+Njucan64 +LW+aQQpq+R544bQeHz1sBhuvwRBmf0x6JSqlBb49+LguR1T635goLpIrr6PgG2LR9zhCX yve+ZEFkcIujeFDDS1E0E5khPp/SxwG5PaPhYMJXpFvrYLMrcgsOwsISinJHjdHcFq882J D+3OYXu3LaKIIjfCPIrux/JvlavDBhObkzaPGS0X6RMmgcZi0eFEHwdlhGeLLC4Hqu+vRR 3fwFt8xAi6PX30caXl66xep/QbZgi2f1HhJaG2zzhAzM6ARc8UJulWoN/4M9tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729513463; a=rsa-sha256; cv=none; b=GRkV3ArsO4RwWRryf59LjltTSS6NVi7KT29Q2Ye09xKN0r6v11xNVWNkv58506jbdmuePP iawYkoDV66bE+a/I4iONfI9jLXi+Na6F1toXvnX+A/6lumVs4ne3HaR0zz5QMEFqQobIna yPh4NObD/m8wZjkj/VfOUp3grUQjU9Uf3rjGxPK92waV8Vw+J/i4EI6q2pjmQ4qOT9snxx VGfjkmjLi5grdhrTL4sryYC05hXkEEsCkk99Ce8k9EeVRMGoM7B0bew4TaHAT8+UMs8hCm 1PlNliwjAB47NyM6o4/ZOA/2sdvuDUzE7cVr3TAfhgbIllGC4Q4j8TF32XPqKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XXDyH60YZzVr8; Mon, 21 Oct 2024 12:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49LCONTq049262; Mon, 21 Oct 2024 12:24:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49LCON5S049259; Mon, 21 Oct 2024 12:24:23 GMT (envelope-from git) Date: Mon, 21 Oct 2024 12:24:23 GMT Message-Id: <202410211224.49LCON5S049259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ea6865bb78c5 - main - arm64: Update how we handle SpecSEI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea6865bb78c5ac007a50f3d06a8e745052f745a0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ea6865bb78c5ac007a50f3d06a8e745052f745a0 commit ea6865bb78c5ac007a50f3d06a8e745052f745a0 Author: Andrew Turner AuthorDate: 2024-10-18 09:17:22 +0000 Commit: Andrew Turner CommitDate: 2024-10-21 12:23:16 +0000 arm64: Update how we handle SpecSEI The ID_AA64MMFR1_EL0.SpecSEI field needs to use MRS_HIGHER to get the largest value from all CPUs. This is because it indicates when an exception might happen when it's non-zero and can't happen when zero. As indicating something that might happen even when it can't is safer use MRS_HIGHER to handle this field. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47126 --- sys/arm64/arm64/identcpu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 834b0c5493b4..f4d297e7d9bc 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1283,7 +1283,14 @@ static const struct mrs_field id_aa64mmfr1_fields[] = { MRS_FIELD(ID_AA64MMFR1, ETS, false, MRS_LOWER, 0, id_aa64mmfr1_ets), MRS_FIELD(ID_AA64MMFR1, TWED, false, MRS_LOWER, 0, id_aa64mmfr1_twed), MRS_FIELD(ID_AA64MMFR1, XNX, false, MRS_LOWER, 0, id_aa64mmfr1_xnx), - MRS_FIELD(ID_AA64MMFR1, SpecSEI, false, MRS_LOWER, 0, + /* + * SpecSEI != 0 indicates the CPU might generate an external abort + * under speculation, while 0 indicates it can't happen. It's safer + * to incorrectly indicate it might happen when it can't rather than + * say it can't happen when it could. As such use the largest value + * found in the system. + */ + MRS_FIELD(ID_AA64MMFR1, SpecSEI, false, MRS_HIGHER, 0, id_aa64mmfr1_specsei), MRS_FIELD(ID_AA64MMFR1, PAN, false, MRS_LOWER, 0, id_aa64mmfr1_pan), MRS_FIELD(ID_AA64MMFR1, LO, false, MRS_LOWER, 0, id_aa64mmfr1_lo),