From nobody Mon Jul 15 12:38:03 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 4WN1vH6sq7z5QrZ9; Mon, 15 Jul 2024 12:38:03 +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 4WN1vH5QDyz4H0x; Mon, 15 Jul 2024 12:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047083; 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=/B70dsZUM6Rzcg3ZQsL7j5P6/zyvv8pDb3ZWvCnzVd4=; b=vOFiludNG4QmBekUxnmGnrpyGBI+wi7yqcfRDTAp4P3y6GWd8wQiMzo+I4LrqSnoa7b7Qb PYW1aZRkO/itHTyK2v3o7SfrgTgLAkIcZLW9B5YhEY2kgAXYxa/aayW41kfX0fBQz3VokI u0EWQ7CHx7vENgtmUulnzNTERcPLAZBEKuIE8PcwWvdw8K3aSXMdcyVwryLq/nyvYrNf0x sEY7h0IVAPFXaGsAj93NunbEX9DIV8EOziu0HW2y3LfSm7C7BoRB9xzuCWGGP2QWovv049 SzdON+1ETT5WXd3YA3QmXQJ83RUm4Us3DWjWFrUun7Nk4bCAF7MSpDCO5RJmMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047083; a=rsa-sha256; cv=none; b=ULfJ5Sp3bkAIdPGtpOOgq1JNRg5lIoUQY3e6LwgSAcu8GfATbaU0zp/zg8gYrMzjbxkYts oU/roni+wT6XrTKqEPgYCx6Kn8zn8Vb8AXnzdOw0uZph78CjTwTu1o39KdGdkblmDBdAf6 iyV6T2lWsojpkHaaEZyDxUyuqtGdeekPdOnIChC3tzj49d9WrhSj1kxiCiksGyfijHWYD5 c+etfF7csS5/HnatOO3hSFlsZ9Mom4IA8DxF3oSFkFlPW8bs220qBsr2wIFU0kMl3NK2PF 9yhKzWFuoPEU5kgztGQK3STws9ddLGnvyGmynrvZvhEOVhSKklgTw1W0ocdENQ== 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=1721047083; 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=/B70dsZUM6Rzcg3ZQsL7j5P6/zyvv8pDb3ZWvCnzVd4=; b=Or1/mKs3WdU3FicN0cCR+HHMqGXsGIYFhFU+5jAMI81kqUViV6fj37BDMx7z2IpXT1GdT/ txVfo1cm6gKozvEavhKa+gqqXRMQERHXf7ijbLI8sGGT1+ZgKsgyVgXTWo5sAzv8ACuBkM +vCG6THxpuHfoo3T9LeqS/kzFzkKxYe0DdGaKXTJnI8Qqt0fqnjud+tgIprtqsKcqY36Ck S1blx9vexUhooNDhHh41QhCQsxt3UttyvTGZVb6YQ+x6qwvloZlfNUNuP4y7stJeR2IsNf 3XOYQtNKdFxeBDFZuzK9cyY/0xaDn05KieYDpES+rtTsGwIi6N4Dizk5Q/fkwg== 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 4WN1vH52sXzsLy; Mon, 15 Jul 2024 12:38:03 +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 46FCc3np059438; Mon, 15 Jul 2024 12:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCc3Nx059435; Mon, 15 Jul 2024 12:38:03 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:03 GMT Message-Id: <202407151238.46FCc3Nx059435@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: 754e1308ce1d - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 754e1308ce1de66f3097cb7f38e81c62faa87804 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=754e1308ce1de66f3097cb7f38e81c62faa87804 commit 754e1308ce1de66f3097cb7f38e81c62faa87804 Author: Andrew Turner AuthorDate: 2024-02-21 18:17:47 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:34:28 +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 f3c871191688..ff6aff00e226 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -122,6 +122,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)