From nobody Tue Jul 2 17:21:36 2024 X-Original-To: freebsd-virtualization@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 4WD8qF5rMqz5NqHd for ; Tue, 02 Jul 2024 17:22:17 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD8qF1d3nz4Mmm for ; Tue, 2 Jul 2024 17:22:17 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=VKuJ3Dob; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::534 as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-72ed1fbc5d9so3016019a12.0 for ; Tue, 02 Jul 2024 10:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719940935; x=1720545735; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jauJgWwjFw6V6vZEvjjOS3ExhB6JkBf8Iq8yx7vplmg=; b=VKuJ3DobwQfZAbeJkWGZsyaR0o3j6Pm6IPCEydoewzi2yXdSoiBNT01k3rzRFOeCDp sfH2Phr1UEIhWrvYN/02tB6rZjA4/xlWaa5aPBUUvzBIGmOE6QKn4yFAuMwAaRiNrRe1 9YvW8oBM1s81KirnIPiWHD4V/DC4FHHjewbrY9HEjTG1e/4hcOli/njgb8O1bT+7icIm FPKhhycF66ZUrIZ+YKP5vv/gKk18yypazMbOvdk6PXrh7lZhjPfOYWkT1P/B3XtvIb21 Ai5+vzuY3ur8AkMANrn41+RCZY38jzdmYo/ZNmPsOlBxC02Qi+ru/Un7KCCpGXN6Hn+J Ze9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719940935; x=1720545735; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jauJgWwjFw6V6vZEvjjOS3ExhB6JkBf8Iq8yx7vplmg=; b=fVyH7GUgocROK2XHdULi3Kwdt7XmPJJZxX5jvELlrn9OkuirTNafcJPzD0mvQ+tUCr N5Z2N2GUB0jj7WLk7D0F2tZ+P8tAnFqiKUd0xnPvcWsr00a09P9K5PCkHrgyqc3K/w6l gA9EjX/TX9Ur3Q6L82Bd9FLvfqJye9W0AucdtPP9tcxt6H39pzqepQtiTOrkftM3v6tQ C4qw9En6NiKVbJ0EFXALmNCYWkE3cqVv9lFkTqyNOo0DiHmTWJk5V+XiGQaqy7ni3J5+ 6T/Q4/xJ1p5uLe8jJ5VdsQnCzMBgMvmL/bAwAAh8F1Lr3SdIDjFIWbUJTr7njgj6F8EH a1bw== X-Gm-Message-State: AOJu0YxjytF+/1zXDvFkKg+vRtLblYYu1paEkKyP8XOXrm1d2bY8WnSx W5mRMlJKGm4w6L7cl+ylz3+pj/kGgWqcQvtzdXSsiNxet3cGJQbYbAuEsXbeAHPFRMbZ4uOubGA CR58id4RaNYFiY6LfLE+y72PXrxW0Mn7NWQeHQg== X-Google-Smtp-Source: AGHT+IF5WwsTnm/yPc+WZK39CLivdT0nximDmV/uZghrIkOHT3YkIx//ZCdsVr7nvlp0mDxwltpYYHiTkLW8zA8NMeQ= X-Received: by 2002:a05:6a20:2590:b0:1bd:1a06:7ef2 with SMTP id adf61e73a8af0-1bef610ab4bmr15269349637.25.1719940933800; Tue, 02 Jul 2024 10:22:13 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 From: Mario Marietto Date: Tue, 2 Jul 2024 19:21:36 +0200 Message-ID: Subject: How to unload the vmm.ko module while FreeBSD is running... To: FreeBSD virtualization Content-Type: multipart/alternative; boundary="00000000000064dad8061c46f42e" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.80 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.81)[-0.806]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::534:from] X-Rspamd-Queue-Id: 4WD8qF1d3nz4Mmm --00000000000064dad8061c46f42e Content-Type: text/plain; charset="UTF-8" Hello. I'm trying to unload the vmm kernel module,but it fails : [root@marietto /bhyve]==> kldunload -fv vmm Unloading vmm.ko, id=13 kldunload: can't unload file: Device busy I don't understand why it fails,since I don't have any bhyve vm currently running : [root@marietto /bhyve]==> ps ax | grep bhyve 6645 4 RL+ 0:00,00 grep bhyve (ggrep) and yes,the vmm module is loaded in memory : root@marietto /bhyve]==> kldstat | grep vmm 13 1 0xffffffff827ac000 37c9e8 vmm.ko how has it been loaded inside the memory ? Using /boot/loader.conf : vmm_load="YES" and it is located inside the directory /boot/kernel and it is called vmm.ko Is there a way to unload it and reload it while FreeBSD is running,without rebooting the system ? thanks. -- Mario. --00000000000064dad8061c46f42e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

I'm trying t= o unload the vmm kernel module,but it fails :

= [root@marietto /bhyve]=3D=3D> kldunload -fv vmm
Unloading vmm.ko, i= d=3D13
kldunload: can't unload file: Device busy

=
I don't understand why it fails,since I don't have any b= hyve vm currently running :

[root@marietto /bh= yve]=3D=3D> ps ax | grep bhyve
6645 =C2=A04 =C2=A0RL+ =C2=A0 =C2=A0 0= :00,00 grep bhyve (ggrep)

and yes,the vmm module i= s loaded in memory :

root@marietto /bhyve]=3D=3D&g= t; kldstat | grep vmm
13 =C2=A0 =C2=A01 0xffffffff827ac000 =C2=A0 37c9e8= vmm.ko

how has it been loaded inside the memory ? Usin= g /boot/loader.conf :

vmm_load=3D"YES&quo= t;

and it is located inside the directory /boot/ke= rnel and it is called vmm.ko

Is there a way to unl= oad it and reload it while FreeBSD is running,without rebooting the system = ? thanks.

-= -
Mario.
--00000000000064dad8061c46f42e--