From nobody Mon Jul 15 12:37:57 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 4WN1v96sndz5QrTg; Mon, 15 Jul 2024 12:37:57 +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 4WN1v95KVHz4GwD; Mon, 15 Jul 2024 12:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047077; 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=6zWI5/BvwJWBfzdY5pB6z5p1AAyVd90+5NQMyMgReKc=; b=Okk3Jg2GD6U9cPSfyemf3KyBzj91X7ANKq32bQ/DpVuE8C1cqEtz138RNRUtHs94DdRiQL HQRdcFJkJS13WX2JvCU2MveOUkBOocFZi9vqHXMnd1htfJFijsV8/o0FlmgbkcNnBr7ZwD GZYGfTv4OcJRR3fw/jbZTQ2ywfcwiAQNMv+hO9qiG0Vw64ae+A+8IPR8DwVojFqkntT4Up MbS3uQ1Xp2bVT+b8v21ZK3rxvwgQz2cFn0uXLJdSif5UttWjPsf+QfDeEWvSWB1NFbzfYD OyEPN1Xzr/M3O4Ipf7QkdXugdI3pZogqan67GFu/Ee4fli0nqDQ3l4Hj7kuYxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047077; a=rsa-sha256; cv=none; b=hQMg7yXfmahgrF7go/GlePXYwwVAykXSsDXVPBpZfgHHIVpcpLTHwmB4jIyD5b9H+nTKp9 1m6m9K44uvHm7/I8yl9ooBXZrsiq7raKdPR0FFbqkuaPY1hiCOC40aGXxqTyMiJEPn8oeo VxMoxz/U9wm9QmIqJueMi8WCFFEmGIJjS15rVUU7bNFchdqmaHYC6ORj++n1FCqTR2ku/M g1sTH/nEpxiRaHhGQ+zjOodr/aFZMkvZWQx5l5pw406n32nfi8F2vkPNDkUIft5oPDWZo1 nhPpYCtpZDp9D183x0QcorDfWfJtWMC7sxg4Lk3SO4pWZ6yKBvjGI7OsCEqGzA== 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=1721047077; 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=6zWI5/BvwJWBfzdY5pB6z5p1AAyVd90+5NQMyMgReKc=; b=krlNWFS7fHLOslweR8n9nrir9WaaEThWsX+ZGa+1buQZOnW4r/T9Xqn1WT2KyyvcO93SIb HC41fR1GyApnlK+zFawFW5TeJSqMI6sG/iuFLv4KodXIS2nx7Ona0ZTZiDJhNSe95mhoHA 3g9aVy09XkDMYIYzyNL5MgB0/KyMb1QJ4JzKt78mPq3eckzrdtZkSH86loCwcgf0jpadQ7 FYGVx1C3CjC0zsTz1sm2BCgejDnO7jVq7sL1xNLmhz1FO1K8Xzm5PYI2o7gaAyqT60JuhT +SHNzZQ9ZCcLHP3Ui5ELnOp7KDPuXTJ7UtNIozTjmQ5PzFKQuaH9fc00Pk4UZA== 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 4WN1v94cbQzsnb; Mon, 15 Jul 2024 12:37:57 +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 46FCbvcb058890; Mon, 15 Jul 2024 12:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCbvPp058887; Mon, 15 Jul 2024 12:37:57 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:37:57 GMT Message-Id: <202407151237.46FCbvPp058887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: c7c27e9ebfdb - stable/14 - arm64: Add a macro to find a VM fault address 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/stable/14 X-Git-Reftype: branch X-Git-Commit: c7c27e9ebfdbd8e46f7af9aeee2a4c407e102981 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c7c27e9ebfdbd8e46f7af9aeee2a4c407e102981 commit c7c27e9ebfdbd8e46f7af9aeee2a4c407e102981 Author: Andrew Turner AuthorDate: 2024-02-21 18:17:47 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:22:07 +0000 arm64: Add a macro to find a VM fault address Add a macro to find which bits from far_el2 are needed to be copied to get the full intermediate physical address (IPA). The hpfar_el2 register only contains a 4k aligned fault address. We need to include the lower bits from far_el2 if we need the full faulting IPA. (cherry picked from commit b3bbec37ba039a46f7166f6fa3571f38da4253e9) --- sys/arm64/include/hypervisor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index 18f173c77720..85ac5cda7037 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -126,6 +126,8 @@ /* HPFAR_EL2_FIPA holds the 4k page address */ #define HPFAR_EL2_FIPA_ADDR(x) \ (HPFAR_EL2_FIPA_GET(x) << 12) +/* The bits from FAR_EL2 we need to add to HPFAR_EL2_FIPA_ADDR */ +#define FAR_EL2_HPFAR_PAGE_MASK (0xffful) /* ICC_SRE_EL2 */ #define ICC_SRE_EL2_SRE (1UL << 0)