From nobody Wed Feb 21 18:55:52 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 4Tg5884fGVz5B8KM; Wed, 21 Feb 2024 18:55:52 +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 4Tg5883HRWz3xnP; Wed, 21 Feb 2024 18:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708541752; 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=nLhLXfW3liWWFTD8jdPRWb5Jcqw3+FAn4NoRi/CxWro=; b=NEQseQlqcSS8BLGyUJB9eOpkJBvgJ6AfIFOjYDqxRnX8QoXT7Rrd/hDByacGhRI9PrgI5R M2Y9WZ8ECzdfpFyI4jxOQBnLvU8CUGKsfeQqmb1IfQM2EI3WAWd0YC8bL/BShUfcDZRgLe r5Pqm6G+6x+V8z8C4Ic1rxHY5BW90Cx42IsHWNHFllPn3DTXwaNVMTwVpApto1JFAyjl/V wkkA6fm+8E9F2VeswJVL4hgmpbrEwhW/8JH7Airxi2quClYzF5K4ysWYG7ehgXg2Xc1hvU BOqpMvv6Ib5MmEEhfwcDVFib3z8x6voQ0uuIL/X28+TiwJrbD63WV9IDGsSNcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708541752; 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=nLhLXfW3liWWFTD8jdPRWb5Jcqw3+FAn4NoRi/CxWro=; b=hTgAHXQLYs+nJ5aY/65Pz9pN2iEnJh7ZwT635cqTfe32VUIujXX4wnIW7Qu+9BKDfCFhX9 F3o9LzDNV5s4A3K6WGDhMb5q3ad/lrV/1/x4pqWI6RvfOzvrTaCF5P20IRKLEMD/7TcUkN guCObzIPmSSx5t7wzBpEvut7qnNTCa3A0E7K6LJx9EX4nvo9bFEiaDjNr3chRNeyhI2byw 4QK/Nwgc1ANoshNJzUbReCSScKUqtMy7BQjkAdRYG62LPB0kc9Q95U5dpLrswlJU/aSqBJ 7lvgxCYbT+bnIUMcw6il93dL/IGfYwFwH5VGbVE8UVt345u/HDclf3iwfeCKRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708541752; a=rsa-sha256; cv=none; b=TEo3r8apQE6mf95T+OVkREN6fH3wtNGQjHOfbD8FcW2k5KcnZcLVu6rJG4bB7W5swXrEY8 uFytDNHho0EZGJvugnv+yXTsOCxeirgmrNk429tN/f+wpWtGxRsc/lKFGupuYeCa9RUTSE cN52pTOugUXMv+fQiMQmyyIUDFEQwMKBf47/0b/OQQlqycJ86jDQw5z2/7XHLf7rtAgxXH Ecugh5FuZFZHPSV+mkwD4CpDAAMAOq0Vjs3y/Q31mBx8pIbyh6EMqFpG8SsIB+8bExIOpC 3Iomol2hFFUOMqs6oEI3J+d7PhIO8rTgMTzK9E9NYW0N0qH8qlj4DL5xkGFn+Q== 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 4Tg5882PJpz1Dyw; Wed, 21 Feb 2024 18:55:52 +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 41LItqq7033534; Wed, 21 Feb 2024 18:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41LItq0g033531; Wed, 21 Feb 2024 18:55:52 GMT (envelope-from git) Date: Wed, 21 Feb 2024 18:55:52 GMT Message-Id: <202402211855.41LItq0g033531@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: b3bbec37ba03 - main - arm64: Add a macro to find a VM fault address 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b3bbec37ba039a46f7166f6fa3571f38da4253e9 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b3bbec37ba039a46f7166f6fa3571f38da4253e9 commit b3bbec37ba039a46f7166f6fa3571f38da4253e9 Author: Andrew Turner AuthorDate: 2024-02-21 18:17:47 +0000 Commit: Andrew Turner CommitDate: 2024-02-21 18:55:32 +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. --- 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)