-
Notifications
You must be signed in to change notification settings - Fork 47
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-device-gpu: Add Initial Implementation #668
base: main
Are you sure you want to change the base?
Conversation
@dorindabassey @mtjhrc great! Thanks for this PR. IIUC this is still WIP, so I marked as Draft, feel free to mark this ready when you want ;-) |
yes, Thanks. I see that it's failing on the CI, once that's resolved we can mark it ready. |
Sure, but IMHO we should merge rust-vmm/vhost#239 first before marking this ready. |
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.
This is a complex device, you did such monumental effort!
Since it's large I'd have to re-read it a couple of times.
you're right, we can wait to merge the first PR. |
the vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx that requires epoxy library Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
the vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx that requires epoxy library Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
the vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx that requires epoxy library Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version adds fixes for libepoxy dependencies which is required for vhost-device-gpu crate more info about the crate can be found here: rust-vmm/vhost-device#668 Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version includes libepoxy dependencies which is required for vhost-device-gpu crate more info about the crate can be found here: rust-vmm/vhost-device#668 link to the container PR that adds libepoxy where the tag is generated can be found here: rust-vmm/rust-vmm-container#103 Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version includes libepoxy dependencies which is required for vhost-device-gpu crate more info about the crate can be found here: rust-vmm/vhost-device#668 link to the container PR that adds libepoxy where the tag is generated can be found here: rust-vmm/rust-vmm-container#103 Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
the vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and the system library packages for rutabaga_gfx crate which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories while for unavailable packages: build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and the system library packages for rutabaga_gfx crate which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories while for unavailable packages: build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and the system library packages for rutabaga_gfx crate which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories while for unavailable packages: build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and the system library packages for rutabaga_gfx crate which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories while for unavailable packages: build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and the system library packages for rutabaga_gfx crate which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories while for unavailable packages: build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
82ced48
to
95202dd
Compare
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and needs some packages and virglrenderer greater that 1.0.0 which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories and for unavailable packages build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and needs some packages and virglrenderer greater that 1.0.0 which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories and for unavailable packages build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The vhost-device-gpu crate linked here rust-vmm/vhost-device#668 contains rutabaga_gfx and needs some packages and virglrenderer greater that 1.0.0 which is not available in the used ubuntu image, so install the neccessary packages that are available in ubuntu's repositories and for unavailable packages build and install it manually. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version includes vhost-device-gpu dependencies which is required for vhost-device-gpu crate more info about the crate can be found here: rust-vmm/vhost-device#668 link to the PR that adds these dependencies where the tag is generated can be found here: rust-vmm/rust-vmm-container#110 Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
95202dd
to
97d7966
Compare
This version includes vhost-device-gpu dependencies which is required for vhost-device-gpu crate more info about the crate can be found here: rust-vmm/vhost-device#668 link to the PR that adds these dependencies where the tag is generated can be found here: rust-vmm/rust-vmm-container#110 Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
7817889
to
98f58ae
Compare
98f58ae
to
95b90a5
Compare
5690fd1
to
ab071b7
Compare
Hi @stefano-garzarella, @epilys, @bilelmoussaoui Thanks for the previous reviews. I think I've addressed all of them. let me know if you have any more comments to discuss. |
ab071b7
to
90f9ff5
Compare
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.
some more comments, mostly for rust bits
90f9ff5
to
3e89404
Compare
749a234
to
bb3c208
Compare
This program is a vhost-user backend daemon that provides VIRTIO GPU device emulation as specified in the VIRTIO Spec v.1.2 https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html This crate utilizes the rutabaga crate from crosvm with some minor modification to rutabaga crate to fix compilation. This crate depends on this PR[rust-vmm/vhost#239] that implements support for QEMU's vhost-user-gpu protocol. This crate supports both gfxstream and virglrenderer library either of these libraries can be used by simply changing the `renderer` command line option. This crate also includes some modifications from libkrun virtio-gpu device https://github.com/containers/libkrun/tree/main/src/devices/src/virtio/gpu Fixes: rust-vmm#598 Co-authored-by: Dorinda Bassey <dbassey@redhat.com> Co-authored-by: Matej Hrica <mhrica@redhat.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com> Signed-off-by: Matej Hrica <mhrica@redhat.com>
bb3c208
to
7c6e34e
Compare
Summary of the PR
I and @mtjhrc have been working on this PR that adds a new crate - vhost-device-gpu.
This vhost-device-gpu crate provides a vhost-user backend daemon for VIRTIO GPU device emulation as specified in the
VIRTIO Spec v.1.2
This crate utilizes the rutabaga crate Imported from crosvm commit: 02110bc6fcc6af70329f410aef8859ec70dd9224
rutabaga_gfx: fixes for crrev.com/c/5279413
The rutabaga crate is vendored because it contains minor modifications to rutabaga_gfx to make it compatible with vhost-device-gpu eventually we would use the upstream version when things are more stable.
This crate includes some modifications from crosvm and libkruns virtio-gpu device
This crate depends on this PR that implements support for QEMU's vhost-user-gpu protocol.
Supported features are:
Using gfxstream component from rutabaga.
Using virglrenderer component from rutabaga.
support the GPU device operations as specified by the virtio specification
TODO and nice to have items:
Add support for the remaining GPU device operations:
add support for directly sharing display output resource using dmabuf instead of copying it by using transfer_read operation.
Fixes: #598
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.