From nobody Wed Feb 21 12:40:25 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 4Tfwpx3L4Dz5C6qp; Wed, 21 Feb 2024 12:40:25 +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 4Tfwpx2pJfz4Tjj; Wed, 21 Feb 2024 12:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708519225; 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=es/q6NxXtQgxSICSk0+C8FBhXQ41/adxez8yfDEdGHQ=; b=WmwsGlgcAXOMBLxsglfnI+vay9SWgDmVwoXI3e8x5obQP4fgAIBnJFYCKlotet1FZ/BB4m 7laPj4htSKyEElBPXaxA0l5NUCt0uZMJ4kC0sf01JLLQc2NnrL4kDgezJ+aDjU6eEPVNJ8 dhZvDdgdZ6Dn/LB4GeCe8/wBUL5hGdB6T/jcjC8wEiGLUkAQ4tCvtd5iu9flWCEkT0okiz 1/yWoGBV3WM0Yv7Gr261C+ulyGUXvIOCELFuaa+QfKGU3toChG+xOb1EQV1k9H+9k/fg6A fKea75aGmfCBhEkx+tE7Bj9ivn/J/x51kSK4BPAURyqwAyfa/S0Mx9IRV3z+OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708519225; 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=es/q6NxXtQgxSICSk0+C8FBhXQ41/adxez8yfDEdGHQ=; b=fDYRHWd6IVYWhiQumaKcJtRyj12e+PL2Qhz+stAz4fSaPFDZUZfOnMxhg0yJfmRojeRcS4 KdkXTjjCX9b7NTT43ObGJLNrTINAwbrTSYl76D4JShgZHutx1GMTKGUFnrF42Y0YlPiz+v XdWK/0uETVsuk4zRmw4ilz9dlLt7NmA8IXJye0zxJ4J1FTaQhQ/9pXT/cR//+h++JAUg4F Nc/7iMRZGfBcJEU+LMy458fkB36O4c4KtRt/vicVVKB5jNKHMVxeX0NjAD47NlPumLcSu9 7nqA4pih/Rk5ShcKSDK0zH7UobzZD7CKITri/uwVRa//ptQ4y1ONZXjp8s/RJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708519225; a=rsa-sha256; cv=none; b=VuvEq7q8kUBBz5rt7EV56vu2oY710TvkMsRvFZY9ltshF/MXIShe5+2HoPt3OLWFov1MEr p3diABtA/XzIBvFw+WH6BxdBd1PkbIIpHH9F9ptJtKuxwFblms+3fJz56soQdppnOiL7IU r+v4zWNDdlju4GOjnlnQysVp8IyGzoy1bZo8zFnSnmsBb4voBHNe4jmimOB/oIWQZPCfgf 11yI4XzOxr99t8DclFPdFrnUf3R6LN8o89RbLJsEoNrpZexkTA4xI9xYTVAlTPN8YbTuX1 z8KqwLxM0YzH/dYCk0WoEvDawi49xusF4rUgRt7GO2uI9zkxkUB3G5QbYgGL5Q== 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 4Tfwpx1slfz12WR; Wed, 21 Feb 2024 12:40:25 +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 41LCePxk040034; Wed, 21 Feb 2024 12:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41LCePmx040031; Wed, 21 Feb 2024 12:40:25 GMT (envelope-from git) Date: Wed, 21 Feb 2024 12:40:25 GMT Message-Id: <202402211240.41LCePmx040031@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: 58df49801d9d - main - arm64: Fix the has_hyp 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 58df49801d9d58e61cc2adc8fd1e6848b64d2453 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=58df49801d9d58e61cc2adc8fd1e6848b64d2453 commit 58df49801d9d58e61cc2adc8fd1e6848b64d2453 Author: Andrew Turner AuthorDate: 2024-02-21 12:38:49 +0000 Commit: Andrew Turner CommitDate: 2024-02-21 12:38:49 +0000 arm64: Fix the has_hyp check boot_el is now the CurrentEL.EL field value. Use the new macros to implement the has_hyp() check. Sponsored by: Arm Ltd --- sys/arm64/arm64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index c7f451543687..2716182ca442 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -212,7 +212,7 @@ has_hyp(void) * XXX The E2H check is wrong, but it's close enough for now. Needs to * be re-evaluated once we're running regularly in EL2. */ - return (boot_el == 2 && (hcr_el2 & HCR_E2H) == 0); + return (boot_el == CURRENTEL_EL_EL2 && (hcr_el2 & HCR_E2H) == 0); } bool