From nobody Tue Jun 25 09:31:30 2024 X-Original-To: dev-commits-src-all@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 4W7fjG5611z5P9y0; Tue, 25 Jun 2024 09:31:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7fjG1h8Yz4KvW; Tue, 25 Jun 2024 09:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307890; 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=K/Uqi29phBSWMz9HytfK0mBENEY7qPL9wODqN0KZk9c=; b=oU4WNLWCoXrTBvLEfEr5rYSZRo6jvQZYD2JGZi5syWeBF44KYuHCFSQPXBeICfppljX4DP 94UkSyVdqH18ywWN4D07xLmK3SXnNzDLN7pvnU/92UM7dlSgK2uPWqp3Yv+jMAsdf+B8LM sJ/G+Wh80FoxQ23GVBIv6E6eKBkjtaAqLADUN/DAf+naj+DPMrkcSSP+oilSlnxcoW4TYB 7aDfkyWLbUIQuhsM7tAM1mLluI5RDeEnJYrfqn9pXOhUxQZ8o2ah79b3EvXju6MugnPWOz u2HgxNctIedztqPOGLUbeg6qzNLQGProxIM5ITlKe4tBFi45afrNSipLdBX/1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307890; a=rsa-sha256; cv=none; b=khe/Q3QQWGqK/8WSo8b4jA3kESu9Ijulw0857SRItQFghg6vI/lLeXCZALFYAhTZx0gGHN NUmtgNc9lmn5AA1VsyPMIK3EA2Bn8YVaE+phiNqZr5NFxfH9ZKsdpZSH6EMRc5sceK+/Q+ OwXVcniSTKyCwUkLRIshIqu+SDlV//SJSQRj++wElG3YWjnTMmeNRWvgsOo774R6kdqWvU 7wkf4zBlnD67AtItJaGM+Ozw4GbSb5/LnZveP3/NHScqstgn3iF9UIiZrRzwzUKj+Sz4Po O7oVTvJbWqcDzepD+lktnkXQf0OJNasJFiMXQvK+Lr/4EqMQYTjuG1Mo+KJCSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307890; 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=K/Uqi29phBSWMz9HytfK0mBENEY7qPL9wODqN0KZk9c=; b=ilNfIKtj/sjauuRtwvZ215Mv9/ZfonbQDFglgSZOX9sq9ub+M0RuLbtHmtIalicSJ/WWMu NRgwt2mxLgQbtfiMb2kyLuBxOZkBMEbEI1OudI/CaAr3NKlxmin2iFVqmSZ5xy4YiNFdSd aralUnrQdCxvKR14u2vIpyGiXPiP8qcUk5wH6souFoJd4S87SwKH7hK9KMofxu8sAH/kdO YXCKvs/pMBFDph9HS8G/BbZGhkVmFoW6rlNYdryBZAjijxVclJM3jKj7lNMLeTADIsz49j 5fPPJ8GVarCdc3E/Kt8p3Z0yB1GB7i+TPUejAkEAb/69UtVZJkd0tSMKDa1yaQ== 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 4W7fjG1HhpzwsC; Tue, 25 Jun 2024 09:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45P9VUbE007010; Tue, 25 Jun 2024 09:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VUgE007007; Tue, 25 Jun 2024 09:31:30 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:30 GMT Message-Id: <202406250931.45P9VUgE007007@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: 0cdd0032a769 - main - arm64/vmm: Fix the SPAN check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0cdd0032a769a727b0e41298e388853ff59007e8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0cdd0032a769a727b0e41298e388853ff59007e8 commit 0cdd0032a769a727b0e41298e388853ff59007e8 Author: Andrew Turner AuthorDate: 2024-06-25 08:41:57 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 arm64/vmm: Fix the SPAN check When raising an exception we may need to set the SPSR_EL1.PAN field. The check for this was incorrect meaning it would be set when it shouldn't be. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45717 --- sys/arm64/vmm/vmm_arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 1b61871014a7..e5eee47b405b 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -1108,7 +1108,7 @@ vmmops_run(void *vcpui, register_t pc, pmap_t pmap, struct vm_eventinfo *evinfo) * Update fields that may change on exeption entry * based on how sctlr_el1 is configured. */ - if ((hypctx->sctlr_el1 & SCTLR_SPAN) != 0) + if ((hypctx->sctlr_el1 & SCTLR_SPAN) == 0) hypctx->tf.tf_spsr |= PSR_PAN; if ((hypctx->sctlr_el1 & SCTLR_DSSBS) == 0) hypctx->tf.tf_spsr &= ~PSR_SSBS;