Skip to content

kmod-setup: fix loading virtio modules, and load other vsock transport modules#40557

Open
yuwata wants to merge 2 commits intosystemd:mainfrom
yuwata:kmod-setup-vsock
Open

kmod-setup: fix loading virtio modules, and load other vsock transport modules#40557
yuwata wants to merge 2 commits intosystemd:mainfrom
yuwata:kmod-setup-vsock

Conversation

@yuwata
Copy link
Member

@yuwata yuwata commented Feb 3, 2026

Fixes #40161.
Fixes #40503.

@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label Feb 3, 2026
@yuwata yuwata added this to the v260 milestone Feb 3, 2026
@yuwata yuwata added the pid1 label Feb 3, 2026
@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Feb 3, 2026
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Feb 3, 2026
@yuwata
Copy link
Member Author

yuwata commented Feb 3, 2026

BTW, has_virtio_console() and has_virtiofs() seem to have the same issue.
Let's also fix them later if this works.

@yuwata yuwata changed the title kmod-setup: fix loading virtio vsock transport driver kmod-setup: fix loading virtio modules, and load other vsock transport modules Feb 4, 2026
@yuwata yuwata removed the please-review PR is ready for (re-)review by a maintainer label Feb 5, 2026
@yuwata yuwata marked this pull request as draft February 5, 2026 04:29
}

static bool may_have_virtio(void) {
return detect_vm() > 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's such a generic check...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and does this even fix things? i mean, if the virtio bus doesn't show up early enough, then the kmods for it might not be able to attach to it either that early, so is this actually fixing the issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but force-pushed with a narrower check.

It seems the device with modalias e.g. virtio:d00000013v, only appears
after the relevant module is loaded. So, we cannot use the string to
determine if we should load the module.

Fixes systemd#40503.
@yuwata yuwata marked this pull request as ready for review February 5, 2026 14:40
@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pid1 please-review PR is ready for (re-)review by a maintainer

3 participants