Skip to contentSkip to conversation

a small issue with VSOCK

Qemu-devel Claudio Imbrenda 2 participants 2 messages Nov 15, 2016 – Nov 17, 2016

lore
Share & tools
lore
#0 lore raw

Hello,

I have found a small issue in the current implementation of VSOCK: if you load both the vhost_vsock module (or if it's compiled in) then the vmw_vsock_virtio_transport will not load successfully (both when compiled as a module or compiled in).

The actual error message I get is:

vmw_vsock_virtio_transport: probe of virtio2 failed with error -16

I dug into the code and it seems that vsock_core_init is called twice, once for the vhost module and once for the virtio-transport module, the second time returning -EBUSY (-16) since it's already initialized.

This means that if a guest loads the vhost_vsock module, or if it is compiled in, then the guest can't use virtio-vsock. This also prevents using vsock in a nested virtualization scenario, where both host and guest modules could work at the same time.

Unfortunately I don't have the time to fix this, I just wanted to raise the issue here, so that you are now aware of it, and can maybe fix it in the future.

best regards,

Claudio Imbrenda

#1 lore raw
Quoted 13 lines · Claudio Imbrenda

I have found a small issue in the current implementation of VSOCK: if you load both the vhost_vsock module (or if it's compiled in) then the vmw_vsock_virtio_transport will not load successfully (both when compiled as a module or compiled in).

The actual error message I get is:

vmw_vsock_virtio_transport: probe of virtio2 failed with error -16

I dug into the code and it seems that vsock_core_init is called twice, once for the vhost module and once for the virtio-transport module, the second time returning -EBUSY (-16) since it's already initialized.

Quoted 8 lines

This means that if a guest loads the vhost_vsock module, or if it is compiled in, then the guest can't use virtio-vsock. This also prevents using vsock in a nested virtualization scenario, where both host and guest modules could work at the same time.

Unfortunately I don't have the time to fix this, I just wanted to raise the issue here, so that you are now aware of it, and can maybe fix it in the future.

Thanks for letting me know. It's definitely something that will need to be fixed. I've added it to my todo list.

Stefan