From nobody Fri Jun 14 01:21:21 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 4W0hLn5BZkz5N2sv; Fri, 14 Jun 2024 01:21:21 +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 4W0hLn3N6Hz4VbX; Fri, 14 Jun 2024 01:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328081; 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=dlgC+ADtc1bFEAM3h4zpb+e/Wg/vTleAtqBrYFj+PeA=; b=UBL0fVpRbInPM+rVQkf0RhUVxqHBTnDLKGej20ZgquytzXZwqeR1n0GsProl06DVQ9kH1+ 7nVqVttINBuf3JSz2CcpCh+AQrFRbtquZmLhofV/p8hGrHZrAB40xFmFuAonpj/yL2o35V E3BG9H7rFEvBGx6j+U3kB53SK0FZ8RXD0tBP6pbsQRAoSKWCYpQCDV/znEk+s0YFNSfnnC 2WTlGeD4cbzCQNwHXOxSOPdSH8DBA1Csx8lOJXnsUy3cnCiPpvwra8/dk4PxUvmmqeLAfa lfMZGwkBN9x73Ur6OYrRM1qHDLLFcvOAqD+2OXDurysi9KS+B2FuNosKXhBcZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328081; a=rsa-sha256; cv=none; b=nbWlqCFQtjaGMegUROEVJG3mhiDvRB60d27V2fT/Kj+xFDIU3CD7svFRtS1MH0hOdGowZG aFAIo6UsIh4CgTRQQ3ZOPe8PPVXfDSj83yKt9/IX3O8al7eabl4QCMGSgDR7xQ2ARDnReB uFlA7j4d0qJpanzogh0iOu7v1Fxms5VwEosAZlirQvdaoXyL896auBaHdssIMY5gMIkAAq FyGUr/3J5Otm+zqa1SDHUF/2O9Z26cgxSLlawpXDa5twq0obYHuFBDOVImR2eVYH6Dq/io pFQ7XnPnoj/Jb+Psqt7ZxZ910mKC/bvF+Slrd+Dm0Vl/SjSIVDFf3BE+WUUMjA== 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=1718328081; 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=dlgC+ADtc1bFEAM3h4zpb+e/Wg/vTleAtqBrYFj+PeA=; b=AJYmCzFaY6LvCsdw0VveJTSN7iDm9q14/8Nmbiy4Ey6K3+QcsKN8bWNz84+7OWeLPN+h58 rQ46/8BQJqvY00y0wVd6jKLtTAtTrIQxdR6gS8cFoAd//YwYWRTcMvD7ULn5RSUefFeMKb KIGQM/YUGY0Dmyw8sv2Sl85ZaMgWo5AK02qvWJDkJfMrgLjs3Pi8ZApfsbnpajnaJkhdgW fAguowAys5cEOesHae1PcEt4aop9n91nh/Av6e5ETQNTTSiaJHYKHtX3qNGDVl2WjSDMac tjZPU/ED/AfedDVNWZufaQ40elGn2KXHnLRNL6+7XjQYiQFgduOFGI34BeeVpA== 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 4W0hLn2wzZz10m3; Fri, 14 Jun 2024 01:21:21 +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 45E1LL6B055879; Fri, 14 Jun 2024 01:21:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LL3e055867; Fri, 14 Jun 2024 01:21:21 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:21 GMT Message-Id: <202406140121.45E1LL3e055867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d730cdea2ab3 - main - arm64/vmm: Avoid unnecessary indirection in vmmops_modinit() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d730cdea2ab32750e45955dd2e570152b6f81def Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d730cdea2ab32750e45955dd2e570152b6f81def commit d730cdea2ab32750e45955dd2e570152b6f81def Author: Mark Johnston AuthorDate: 2024-06-14 00:16:57 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:19:00 +0000 arm64/vmm: Avoid unnecessary indirection in vmmops_modinit() Most of vmm.h is machine-independent. Simplify merging amd64 and arm64 vmm code by removing this machine-dependent routine from arm64's vmm.h. No functional change intended. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D45557 --- sys/arm64/include/vmm.h | 7 ------- sys/arm64/vmm/vmm_arm64.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index cf00dd60a43f..05b013557c06 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -201,13 +201,6 @@ cpuset_t vm_active_cpus(struct vm *vm); cpuset_t vm_debug_cpus(struct vm *vm); cpuset_t vm_suspended_cpus(struct vm *vm); -static __inline bool -virt_enabled(void) -{ - - return (has_hyp()); -} - static __inline int vcpu_rendezvous_pending(struct vm_eventinfo *info) { diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 6b058a993cdd..1b61871014a7 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -239,7 +239,7 @@ vmmops_modinit(int ipinum) int cpu, i; bool rv __diagused; - if (!virt_enabled()) { + if (!has_hyp()) { printf( "vmm: Processor doesn't have support for virtualization\n"); return (ENXIO);