This repository was archived by the owner on Feb 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
qemu driver vsock support #411
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38d40ae to
e9f215f
Compare
e9f215f to
cb5fbcc
Compare
laijs
reviewed
Feb 24, 2017
lib/vsock/vsock.go
Outdated
| const hyperDefaultVsockCid = 1024 | ||
| const hyperDefaultVsockBitmapSize = 16384 | ||
|
|
||
| func Dial(cid uint32, port uint32) (net.Conn, error) { |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems better if it is moved to lib/vsock/vsock_conn.go
Patch it in vendor so we don't have to use cgo for vsock related syscalls. Signed-off-by: Peng Tao <bergwolf@gmail.com>
It only works for Linux. Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
…ctions So that it works for both serial and vsock connections. Also rename serial.go to json.go to reflect the fact that both connections work and it is all about json protocol here. Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
It indicates if underlying driver supports the linux vsock feature. Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
When vsock is configured and supported, grab new vsock guest cid when creating new vm context. Also save and load guest cid in persistent info. Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
libvirt by default uses cgroup controller to limit and grant guest permissions. However, when adding device via qemu monitor directly, libvirt has no knowledge and thus does not grant proper permissions to qemu process. As a result, qemu will get EPERM opening /dev/vhost-vsock device. To work around it, remove devices from cgroup_controllers in /etc/libvirt/qemu.conf. Signed-off-by: Peng Tao <bergwolf@gmail.com>
cb5fbcc to
07fa430
Compare
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Member
Author
|
@laijs updated with following requested changes:
One thing to note: |
jimoosciuc
pushed a commit
to jimoosciuc/runv
that referenced
this pull request
May 26, 2020
qemu driver vsock support
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR rebases #355 on top of latest master. It changes qemu and libvirt driver to support vsock device in guest vm:
Requires: hyperhq/hyperstart#249
TODOs: