This is a patchset for Cloud Hypervisor support providing a virtio-gpu device to guests, using crosvm’s virtio-gpu implementation over vhost-user.
If this patchset is useful to you, please consider donating to support its continued development via either GitHub Sponsors or LiberaPay.
The patches as developed as part of Spectrum, a compartmentalized desktop operating system project.
cargo build
in the Cloud Hypervisor source tree as
normal.
crosvm device gpu --socket gpu.sock
Connect to the GPU device with cloud-hypervisor:
cloud-hypervisor --gpu socket=gpu.sock …
The patches are maintained in Spectrum’s git repository. Please refer to the documentation for contributing to Spectrum.
I don’t think so. The Cloud Hypervisor developers are not very interested in GPU support — although perhaps an implementation that was just a vfio-user frontend implementation, deletaging all of the complexity of rendering, input handling, etc. to another process would be light enough to overcome that — but on top of that, communicating with crosvm’s GPU device requires using non-standard commands that are not part of the vhost-user specification.
It’s possible that, in future, it might be possible to use an external
virtual GPU device with an unmodified Cloud Hypervisor
using vfio-user
or VHOST_USER_PROTOCOL_F_PROBE
,
or that at least the custom vhost-user commands could be standardized.
Other Cloud Hypervisor work is regularly upstreamed as part of the Spectrum project.
Bug reports for and other questions about the patchset are welcome! You can send mail to the discuss@spectrum-os.org mailing list, or ask in the Spectrum Matrix chat.
Permission is granted to copy, distribute and/or modify this document under either the terms of the Creative Commons Attribution-ShareAlike 4.0 International License, or the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.