Skip to content

rutabaga_gfx roadmap/discussion/collaboration #24

@gurchetansingh

Description

@gurchetansingh

Hello!

With rutabaga finally deleted from crosvm and this repo being the new source of truth, this is a good time to discuss needs/desires from the project going forward.

This is motivated by a thread on fd.o where I proposed greater collaboration among virtio-gpu enthusiasts to reach our respective goals. A big part is sharing thinking and ideas, so the development process is truly open.  

Goals: First things first, the question I want to answer is: what is the what is rutabaga? rutabaga is a set of crates that enable cross-platform, open-source, Rust-based GPU/display para-virtualization.  It exists to serve its needs of whichever VMMs  use it -- most notably crosvm, QEMU, rust-vmm, others -- which then enable other larger projects (Android virtualization and Linux virtualization).

It has dependencies on gfxstream, virglrenderer and increasingly Rust-based crates housed in Mesa3D itself.

Image

Open-source is the most important one, since it benefits all projects and makes sure the project is not reliant on a single corporation.  For example, although rutabaga has origins in crosvm, it does not require a corporate Google CLA like other Chromium-based projects (browser, CrOS, others).  This is because we've noticed corporate CLAs cause unnecessary hassles to partners and open-source developers alike, with little tangible benefit since everyone relies on FOSS projects anyways. For rutabaga, older code will keep the BSD-3-License for legacy reasons, but newer code is encouraged to use the MIT (functionally, the difference is negligible between BSD-3 and MIT. MIT is just simpler).

Cross-platform is another important one, since for example 70% of the market and developer base still uses Windows.  We are also interested in running ANY guest OS in a VM with accelerated graphics -- including Windows, Haiku, Fuchsia.  Cross-platform desires make rutabaga goals quite ambitious, since it showcases the true power of VIRTIO.

What about HW-accelerated virtualization and SR-IOV?  When SR-IOV and GPU assignment is available from major vendors on major guest OSes, I'll be the first to sign-up. Until then, VIRTIO is the best we have.

Communication: just file issues on Github or fd.o gitlab, and tag relevant devs.  Chat rooms would be useful, but everyone probably uses something different (irc/discord/google chat), maybe we can agree to congregate on an existing one??    

 With that introduction out of the one, here are potential work items we can concretely collaborate on:

Magma

We would like to land Magma.  There are multiple possibilities in this space.  Right, there's some support for (msm, i915/Xe, amdgpu, d3dkmt), plans for Fuchsia backends under ONE library interface/protocol.  The memory management is looking good, but we still need to cover all use cases. Command buffer submission (including VM_BIND varieties) needs to be taken care of.  Use extensible structs if you need to and focus on the Rust API. FFI/protocol/encode/decode should be autogen'ed.

apigen-xml

We would like to generate a client <--> server protocol, and a host <--> guest protocol too. Hand-writing is a pain, so we started the apigen-xml project to auto generate these protocols. Many concepts are modern-day reinterpretations of gfxstream.  This is useful for both Magma and other protocols.  This is exactly what virtio-gpu is: a way to route to guest/host. 

ntx-rs

Some have suggested writing the nctx in Rust rather than waiting for Magma.  Make sense, Mesa already supports nctx.  But I suggest use of Rutabaga, since many people like to pair nctx/cross-domain and we can possibly even implement nctx-on-Magma, helping both the cross-platform and Linux-specific initiatives.

upstream GBM instead of minigbm

With the ChromeOS LTS branch created, it is no longer necessary to use minigbm for rutabaga gralloc. This is useful for sharing cross-domain Wayland passthrough directly with the display without memfd. Will work with linear dma-bufs. This is also useful for Android guests when enabling the next-generation cross-domain allocator.

Package virtwl-proxy in Debian and fence passing?

So Sommelier is essentially dead.  Nobody works on it and it's buggy. It seems the most maintained solution is virtwl-proxy. Also interested in X11 compatibility issues and possible solutions.

Also some people were interested in fence-passing to the host compositor. We should get that working, eventually.

gfxstream guest + windows Kumquat + gfxstream backend

So I got it building. To land it, it could be better if we actually got it building and running. Need to finish stubs for Windows in mesa3d_util.

meson improvements to support rlib versioning

rutabaga wants to depend on Mesa3D crates.  But right now Meson requires using subprojects to integrate Rust crates.  It would be better to use for some package-config based handsake to exist, so one Rust project can discover another. See discussion here. The meson devs are open to it, and it would help ALL Rust crates.

Anyways, these are just ideas we can POTENTIALLY collaborate on, possibly via Github projects. If you have other ideas, feel free to share :-)

CC: @valpackett @DemiMarie @alyssais @talex5 @digetx @robclark @slp @dorindabassey @mtjhrc @stsquad @epilys @lygstate @elmarco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions