From nobody Fri May 2 17:31:05 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 4Zpyd56KWyz5tmSN; Fri, 02 May 2025 17:31:05 +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 4Zpyd55lV1z3V12; Fri, 02 May 2025 17:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746207065; 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=avWFQltoYHQTGf/Sw0SZMNcLTPwPPtt5lMAxm0FOs6k=; b=twRBlT5E5tJhKhRkhh/oMJVWyQoJBtQPKpJuAQKhnya/fnwxJm5AiC2OJAnZ1+siT7TQNs aEGIc2bKKBXxFH9oPUc9tVubcUE23Tfq+sUsqYDmTrXrrHP8YpeKNd9fUJdOXMWx94qE0X AAXWCcR0irz9AVWCUfoODNNFyY08qPOQoEfpEyE3eHcDhgYCbOnSVmkCYAauaQw1DBzlYz wrbti1kvIyenyTFdNaDAd7jOshdhcJExTb71Tuc7lkODN/kirFUqf/ZdE61mFcglQNFXSZ RZaCP+gqcjfbd8h2yqKE+bNs/brfZgBllDnvS265JNrAp9eFcqqmG9Cfb694XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746207065; 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=avWFQltoYHQTGf/Sw0SZMNcLTPwPPtt5lMAxm0FOs6k=; b=SzOcrI4TExYAwvXlvXUFG3JUvNaevzGwOvNdei22JM2wPkN45dMzBU0NBHs5I8wLTQORqY 2GbUsrOmhOMwd4Fyw15pJ0bjmx4zp0+argtBD2v41dTPmOf8k/hnymqCx7m5dno727oL6F vVDnsW9684PeUM9pplFuw0Aa15y/WLkZGD3Tj/tpYEllCg11vxPChOYNLq3MuIrKoVwIqa KenjfuMneLSNDicw5sqhlzppCvQuTWd+g1mYTHvkyEpRGoI66KSoM2qiPpElx0ZLIfdr6q TD9jr1v5gsjyUz+rZRWnikvzleBvZxKYV6DmM0Xs0Sea5dP8sTWXfcDZgQyEsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746207065; a=rsa-sha256; cv=none; b=l9yK84tRqzMHuH5NUvViX57uQ9AldjGKrsW5G+V08IbyB1sSAwrUzaCw+v3OUUDCa2dNZn JX57bVotyMVKQ2GDfW15CLO0x1ZScOwy03zbcgFmIaMwrilL5BQGDbbAqYR5V8CgLKdjqk Htw4seIq4Tzx4b2vnnmeGu5tK5khdnVWqaSrkt0JGOsHmcji3PAIqO9KsyLMAYuZ5NFlCs tiHvVAel/Od175Haej823KQLawXPuSOgroSaFe9JoZ/1lxMRwufmP2jbXQI5wRIQI3glbT EwiT+7YUh+KjB21I8iQLEJs+9e0IKajhCRS203icl82WynZNF2p5wn733+Jh/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Zpyd55LRvz1Lb3; Fri, 02 May 2025 17:31:05 +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 542HV5Ei098598; Fri, 2 May 2025 17:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 542HV5nD098584; Fri, 2 May 2025 17:31:05 GMT (envelope-from git) Date: Fri, 2 May 2025 17:31:05 GMT Message-Id: <202505021731.542HV5nD098584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 5ea28c513979 - main - tests/ci: Switch vmm detection 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: bofh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ea28c51397906a7cabb06089974feb21e2a7979 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=5ea28c51397906a7cabb06089974feb21e2a7979 commit 5ea28c51397906a7cabb06089974feb21e2a7979 Author: Muhammad Moinur Rahman AuthorDate: 2025-05-02 17:28:51 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-05-02 17:28:51 +0000 tests/ci: Switch vmm detection Previously, the CI Makefile used `kldload -n vmm` to determine whether the host supported bhyve virtualization. However, due to changes in how QEMU/KVM exposes CPU features to guests, this check no longer reliably indicates the presence of usable VMX/SVM support. In particular, modern QEMU configurations expose the vmx CPUID bit by default, allowing the vmm module to load even when nested virtualization is disabled. This causes the old check to incorrectly succeed inside virtualized environments where bhyve cannot function. This patch replaces the check with a sysctl-based approach that inspects kern.vm_guest. If the system identifies itself as running inside a guest (!= "none"), we assume nested virtualization is unavailable and fallback to QEMU. This change ensures CI behaves correctly on platforms where the vmm module loads but is not usable. Approved by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50115 --- tests/ci/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index e452d74679af..e51c97fa2b83 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -123,8 +123,8 @@ VM_MEM_SIZE=${QEMU_MAX_MEM_SIZE}g .else VM_MEM_SIZE=${VM_MEM}g .endif -KLDVMMISLOADED!=kldload -q -n vmm 2>/dev/null && echo "1" || echo "0" -.if ${KLDVMMISLOADED} == "0" +VMGUEST!=sysctl -n kern.vm_guest 2>/dev/null || true +.if ${VMGUEST} != "none" USE_QEMU?=1 .endif KLDFILEMONISLOADED!=kldload -q -n filemon 2>/dev/null && echo "1" || echo "0"