]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kmod-setup: also load other vsock transport modules 40557/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 4 Feb 2026 07:11:38 +0000 (16:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Feb 2026 07:14:54 +0000 (16:14 +0900)
Fixes #40161.

src/core/kmod-setup.c

index 82b53959b3a52e7642df095cee880444fab0c572..499e09443ff653d6d1ec9dd0c6d3f0f1b2bf2c61 100644 (file)
@@ -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