Skip to content
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

vhost-user-vsock #49

Open
aep opened this issue Jun 30, 2022 · 3 comments
Open

vhost-user-vsock #49

aep opened this issue Jun 30, 2022 · 3 comments

Comments

@aep
Copy link

aep commented Jun 30, 2022

vhost-user-vsock implements vsocks as uds on the host.

i wonder what it takes to implement that in this package.
there appears to be a rust impl

https://github.com/rust-vmm/vhost-device/pull/7/files

but i'm not sure if thats the correct layer

@mdlayher
Copy link
Owner

Hey there, I have very little context as to what this actually is or what sort of use cases it solves. It's my understanding that the virtio-vsock device with qemu is the defacto solution but would this be for communicating between local processes on the same machine? If so then more recent versions of the vsock kernel modules support loopback communication on the same host.

I just ask because I am a bit removed from the space and would like to understand the use cases for the feature here, and what sort of APIs you'd expect to see. Thanks!

@aep
Copy link
Author

aep commented Jun 30, 2022

ah, sorry!

normally vsock is implemented by using the host kernel vsock implementation. i.e. the host just opens a socket with AF_VSOCK. However, that's not safe in multi tenancy situations where you don't trust the VMs, so that's what vhost-user-vsock is for.

It implements the host side as vhost-user unix domain socket. the pull request i linked contains an example implementation in rust. Unfortunately i dont know much more either. it looks like vhost-user is fairly complex and i couldnt find a golang implementation of it. It's likely not worth it implementing it in go-vsock if the base vhost-user impl doesnt exist

@mdlayher
Copy link
Owner

No worries! We can leave this open for tracking but yeah it seems like a lot more plumbing would be required.

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

No branches or pull requests

2 participants