From nobody Wed Jul 16 03:49:11 2025 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 4bhhr76ZKCz621lL; Wed, 16 Jul 2025 03:49:11 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bhhr75PDmz43Y8; Wed, 16 Jul 2025 03:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752637751; 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=h+RF5nJQOf+u2EldD1EHE7sIInhG9i2dDnIwCP4A0AU=; b=qb7uDrkZ28+zWYBz6JgEZ9bbZouU5AeSq7RMxZHSmA5jPHGjq5zSZ2RCF1bEkzHorqusJk vFghWy1ep68IAxq164a0QFBD3gcMX1atbnXnsX1R8x6WZkpr8Rm47qJyQKqKUflGPthTM9 sDRUVhFmKW0aZaJ1zpx4EoMLGVavXSgyuQtQ9RSi4B1zMPyUre4f+P5n/vNjy/NDpp3cBu +1WE9s2Z+yvedHz0HJWebXyhI/4bxvXSR+GwfuunF9MRV68gmoGnuBpQRHgfnIQhy4lwV0 /oYUIgaYEcraRgHxz29uQzSH0U105lF8cIoSMmpQkTOOrmyBQaH5mVkSjE7+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752637751; 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=h+RF5nJQOf+u2EldD1EHE7sIInhG9i2dDnIwCP4A0AU=; b=hvgrspicUH7u3os+bjvifCeq50rTuyPgaz1Boj8PvA5ct2VW35ZcyL3ceNShjl4PncFzfn bRHJch7Oh5EfdvxblWh6rarbSd4Pz05WJ4l/y3Mxipxdu/1GZs4zE6zZYxuYY4u42uN6CG 0h7t4c50hwgBgiQRfxSA6m67HEsqo2pl+/9lO7biwwzxtd+4Yh6lBP1MVbkhMv78tVXIMa gNww+vped87bfq7C1iGhA9LNAhzRz3dMYCXrDHJxcL4k0ZEnObeihn/fcF4Bdd0U96Y//2 7jJfy7r8/eNNELTgzzt++b4Nq+4xxweQrSRSeg15r2sY023rsFVsbvNc4ORi8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752637751; a=rsa-sha256; cv=none; b=A7chKH9R0WoFP6Bmk2YUlQeoA1L72dCkbnQhFHvLxqlSIG7B9gedJ11DB0dIEuSs9SE9jx OzmiY/0vrANTyTOWpzns25KVCZZmAO1KYZM9uzPH1iY6Wn4dbH+9/TtnYv3rmwFIEQxhT8 JNxZhPRjHDYVdW3NyxDL2ABoDWVNMQZ/V8xO4Arhu0Wj4x+cM4ITYUBi135bAMr8wjV9lc TR/9dSPA3lAebm+zCuBT+wQc1i5nJ5YLmO2Bx074v/j09jUif8hqRkPW1FwMv3vor3uy+d wTFqlg2oAzUxh9gQOTXX8aj9hihh2MqxT0BD97qw7OCCSe5MkWsRqBWS0/N6jw== 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 4bhhr7511zz17d3; Wed, 16 Jul 2025 03:49:11 +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 56G3nBaG025273; Wed, 16 Jul 2025 03:49:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56G3nBk2025270; Wed, 16 Jul 2025 03:49:11 GMT (envelope-from git) Date: Wed, 16 Jul 2025 03:49:11 GMT Message-Id: <202507160349.56G3nBk2025270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: cb193bdf8aa6 - main - amd64: restore semantic for VIRT_IN_DMAP() 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb193bdf8aa685f0f161ee8c57c6d05d1ee6ef67 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cb193bdf8aa685f0f161ee8c57c6d05d1ee6ef67 commit cb193bdf8aa685f0f161ee8c57c6d05d1ee6ef67 Author: Konstantin Belousov AuthorDate: 2025-07-15 23:42:56 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-16 03:48:45 +0000 amd64: restore semantic for VIRT_IN_DMAP() The macro should check if the virtual address falls into working direct map, not that it falls into KVA potentially belonging to DMAP. This was its previous meaning, as can be seen in the only use by DMAP_TO_PHYS(). Fixes: 4dd828c80828637452a8a4e07a64e294c82e5d8b Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51334 --- sys/amd64/include/vmparam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 59053665dc40..e4cc05cbb889 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -249,7 +249,7 @@ */ #define PHYS_IN_DMAP(pa) (dmaplimit == 0 || (pa) < dmaplimit) #define VIRT_IN_DMAP(va) \ - ((va) >= kva_layout.dmap_low && (va) < kva_layout.dmap_high) + ((va) >= kva_layout.dmap_low && (va) < kva_layout.dmap_low + dmaplimit) #define PMAP_HAS_DMAP 1 #define PHYS_TO_DMAP(x) __extension__ ({ \