Skip to content

Commit 539e482

Browse files
author
Dorinda Bassey
committed
vhost-device-gpu: Add Initial Implementation
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 Imported from crosvm This crate depends on this PR[rust-vmm/vhost#239] that implements support for QEMU's vhost-user-gpu protocol. This crate also includes some modifications from libkrun virtio-gpu device https://github.com/containers/libkrun/tree/main/src/devices/src/virtio/gpu This device can be tested following the instructions explained in the README.md file under staging/vhost-device-gpu/. 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>
1 parent 5457676 commit 539e482

File tree

12 files changed

+3977
-4
lines changed

12 files changed

+3977
-4
lines changed

staging/Cargo.lock

Lines changed: 182 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[workspace]
22
resolver = "2"
33
members = [
4+
"vhost-device-gpu",
45
"vhost-device-video",
56
]

staging/vhost-device-gpu/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
## [Unreleased]
3+
4+
### Added
5+
6+
### Changed
7+
8+
### Fixed
9+
10+
### Deprecated
11+
12+
## [0.1.0]
13+
14+
First release

staging/vhost-device-gpu/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "vhost-device-gpu"
3+
version = "0.1.0"
4+
authors = ["Dorinda Bassey <dbassey@redhat.com>", "Matej Hrica <mhrica@redhat.com>"]
5+
description = "A virtio-gpu device using the vhost-user protocol."
6+
repository = "https://github.com/rust-vmm/vhost-device"
7+
readme = "README.md"
8+
keywords = ["gpu", "vhost", "virt", "backend"]
9+
license = "Apache-2.0 OR BSD-3-Clause"
10+
edition = "2021"
11+
publish = false
12+
13+
[features]
14+
xen = ["vm-memory/xen", "vhost/xen", "vhost-user-backend/xen"]
15+
16+
[dependencies]
17+
clap = { version = "4.4", features = ["derive"] }
18+
env_logger = "0.10"
19+
libc = "0.2"
20+
log = "0.4"
21+
rutabaga_gfx = { path = "rutabaga_gfx", features = ["virgl_renderer"] }
22+
thiserror = "1.0"
23+
vhost = { git = "https://github.com/mtjhrc/vhost.git", package = "vhost", branch = "gpu-socket-final", features = ["vhost-user-backend"] }
24+
vhost-user-backend = { git = "https://github.com/mtjhrc/vhost.git", package = "vhost-user-backend", branch = "gpu-socket-final", features = ["gpu-socket"] }
25+
virtio-bindings = "0.2.2"
26+
virtio-queue = "0.12.0"
27+
vm-memory = "0.14.0"
28+
vmm-sys-util = "0.12.1"
29+
zerocopy = "0.6.3"
30+
31+
[dev-dependencies]
32+
assert_matches = "1.5"
33+
virtio-queue = { version = "0.12", features = ["test-utils"] }
34+
vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic"] }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE-APACHE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE-BSD-3-Clause

0 commit comments

Comments
 (0)