kmod-setup: also load other vsock transport modules

Fixes #40161.
This commit is contained in:
Yu Watanabe
2026-02-13 16:14:54 +09:00
parent 6d36e5fae6
commit 356cc4a1c3
+10
View 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