From: Yu Watanabe Date: Wed, 4 Feb 2026 07:11:38 +0000 (+0900) Subject: kmod-setup: also load other vsock transport modules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=356cc4a1c32cee21107174be7a7991602eb861d2;p=thirdparty%2Fsystemd.git kmod-setup: also load other vsock transport modules Fixes #40161. --- diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c index 82b53959b3a..499e09443ff 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -86,6 +86,14 @@ static bool may_have_virtio(void) { static bool in_qemu(void) { return IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_QEMU); } + +static bool in_vmware(void) { + return detect_vm() == VIRTUALIZATION_VMWARE; +} + +static bool in_hyperv(void) { + return detect_vm() == VIRTUALIZATION_MICROSOFT; +} #endif int kmod_setup(void) { @@ -114,6 +122,8 @@ int kmod_setup(void) { /* Make sure we can send sd-notify messages over vsock as early as possible. */ { "vmw_vsock_virtio_transport", NULL, false, false, may_have_virtio }, + { "vmw_vsock_vmci_transport", NULL, false, false, in_vmware }, + { "hv_sock", NULL, false, false, in_hyperv }, /* We can't wait for specific virtiofs tags to show up as device nodes so we have to load the * virtiofs and virtio_pci modules early to make sure the virtiofs tags are found when