Skip to content

lcow: disable virtio-vsock init #2461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Jun 18, 2025

When a kernel is built with virtio-vsock we encounter a kernel panic in our init script, while trying to read entropy from the host. Parsing through the boot logs, it seems like the hv_sock transport is not being initialized:

[    0.712310] NET: Registered PF_VSOCK protocol family
[    0.716225] hv_vmbus: registering driver hv_sock
[    0.719551] hv_vmbus: unregistering driver hv_sock
[    0.723281] IPI shorthand broadcast: enabled

Disabling virtio_vsock_init seems to fix the problem:

[    0.829397] NET: Registered PF_VSOCK protocol family
[    0.831728] initcall virtio_vsock_init blacklisted
[    0.835999] hv_vmbus: registering driver hv_sock
[    0.837906] IPI shorthand broadcast: enabled

For kernels built without virtio-vsock, skipping virtio_vsock_init is a no-op:

[    0.539320] NET: Registered PF_VSOCK protocol family
[    0.541417] hv_vmbus: registering driver hv_sock
[    0.549999] IPI shorthand broadcast: enabled

When a kernel is built with virtio-vsock we encounter a kernel
panic in our init script, while trying to read entropy from the
host. Parsing through the boot logs, it seems like the hv_sock
transport is not being initialized:
```
[    0.712310] NET: Registered PF_VSOCK protocol family
[    0.716225] hv_vmbus: registering driver hv_sock
[    0.719551] hv_vmbus: unregistering driver hv_sock
[    0.723281] IPI shorthand broadcast: enabled
```

Disabling `virtio_vsock_init` seems to fix the problem:
```
[    0.829397] NET: Registered PF_VSOCK protocol family
[    0.831728] initcall virtio_vsock_init blacklisted
[    0.835999] hv_vmbus: registering driver hv_sock
[    0.837906] IPI shorthand broadcast: enabled
```

For kernels built without virtio-vsock, skipping `virtio_vsock_init`
is a no-op:
```
[    0.539320] NET: Registered PF_VSOCK protocol family
[    0.541417] hv_vmbus: registering driver hv_sock
[    0.549999] IPI shorthand broadcast: enabled
```

Signed-off-by: Maksim An <maksiman@microsoft.com>
@anmaxvl anmaxvl requested a review from a team as a code owner June 18, 2025 23:23
@anmaxvl anmaxvl merged commit 914512d into microsoft:main Jul 2, 2025
19 checks passed
@anmaxvl anmaxvl deleted the skip-virtio-vsock-init branch July 2, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants