mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
b1394f719d
rutabaga_gfx is a cross platform, Rust-based, Wayland and Vulkan-centric Virtual Graphics Interface (VGI). Apologies for the mega-change, but it was hard to do this piece by piece. The rationale for this change is: 1) Android graphics virtualization experts have been proposing for a VGI for many months (years?). Their goal is to boot Android anywhere, everywhere. 2) For the {wayland, cross-domain} context type prototype, it's desirable to create a {wayland, camera} connection at the appropriate time. Details can be found in the code, though the RutabagaChannels have yet to be hooked up. There's a high chance neither effort will work. As such, rutabaga is just a prototype. However, even (1) and (2) don't end up working, this refactor/cleanup by itself makes a ton of sense. Here's a summary of revelant changes: * Removed auto-generated {p_defines, p_format, virgl_protocol}. These files were added for tests when bringing up crosvm-gpu, and AFAICT these tests are not run. There's actually now a commit queue for virglrenderer changes and container boot tests that provides excellent coverage. * Removed command_buffer.rs. Used only for the previously mentioned tests. It's quite nice, but couldn't determine the right place to put it. Maybe data_model? But removed it in the interim. * Removed {write_from_guest_memory, read_to_volatile}. The same basic functionality has been moved into {transfer_write, transfer_read} in Rutabaga. * Removed VirtioResource, Virtio3DResource, Virtio2DResource, and VirtioGfxStreamResource in favor of VirtioGpuResource and RutabagaResource. This leads to less duplication and clearer separation between external library functions and VMM functions. * Moved display and hypervisor memory management functions to virtio_gpu.rs. This is because external components do not interface with this functionality, and there was a lot of duplication (for example map/unmap blob). * Added context management between gfxstream and virglrenderer. * Added separate gfxstream and virglrenderer flags. * Clearer naming. * Added simple implementations for context init and multiple timelines. These changes have no effect since all Google kernels don't pass the revelant flags, but are useful for theoretical {wayland, cross-domain} prototype. * Unify RESOURCE_CREATE_3D and RESOURCE_CREATE_2D handling. * Better error handling. BUG=b:146066070, b:173630595, b:150239451 TEST=launch virtual machine with 2D mode TEST=launch virtual machine with 3D mode TEST=boot ARCVM Change-Id: I240b0c134a3b562cbc65981837a41f6db7767c92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2522452 Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
111 lines
3.3 KiB
TOML
111 lines
3.3 KiB
TOML
[package]
|
|
name = "crosvm"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
|
|
[lib]
|
|
path = "src/crosvm.rs"
|
|
|
|
[[bin]]
|
|
name = "crosvm"
|
|
path = "src/main.rs"
|
|
|
|
[profile.release]
|
|
panic = 'abort'
|
|
overflow-checks = true
|
|
|
|
[workspace]
|
|
members = ["qcow_utils"]
|
|
exclude = [
|
|
"assertions",
|
|
"base",
|
|
"cros_async",
|
|
"data_model",
|
|
"rand_ish",
|
|
"sync",
|
|
"sys_util",
|
|
"syscall_defines",
|
|
"tempfile",
|
|
"vm_memory",
|
|
]
|
|
|
|
[features]
|
|
default = ["audio"]
|
|
chromeos = ["base/chromeos"]
|
|
default-no-sandbox = []
|
|
audio = ["devices/audio"]
|
|
gpu = ["devices/gpu"]
|
|
plugin = ["protos/plugin", "crosvm_plugin", "kvm", "kvm_sys", "protobuf"]
|
|
power-monitor-powerd = ["arch/power-monitor-powerd"]
|
|
tpm = ["devices/tpm"]
|
|
video-decoder = ["devices/video-decoder"]
|
|
video-encoder = ["devices/video-encoder"]
|
|
wl-dmabuf = ["devices/wl-dmabuf", "gpu_buffer", "resources/wl-dmabuf"]
|
|
x = ["devices/x"]
|
|
virtio-gpu-next = ["rutabaga_gfx/virtio-gpu-next"]
|
|
composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
|
|
gfxstream = ["devices/gfxstream"]
|
|
gdb = ["gdbstub", "thiserror", "arch/gdb", "vm_control/gdb", "x86_64/gdb"]
|
|
|
|
[dependencies]
|
|
arch = { path = "arch" }
|
|
assertions = { path = "assertions" }
|
|
audio_streams = "*"
|
|
base = "*"
|
|
bit_field = { path = "bit_field" }
|
|
crosvm_plugin = { path = "crosvm_plugin", optional = true }
|
|
data_model = "*"
|
|
devices = { path = "devices" }
|
|
disk = { path = "disk" }
|
|
enumn = { path = "enumn" }
|
|
gdbstub = { version = "0.4.0", optional = true }
|
|
gpu_buffer = { path = "gpu_buffer", optional = true }
|
|
rutabaga_gfx = { path = "rutabaga_gfx", optional = true }
|
|
hypervisor = { path = "hypervisor" }
|
|
kernel_cmdline = { path = "kernel_cmdline" }
|
|
kernel_loader = { path = "kernel_loader" }
|
|
kvm = { path = "kvm", optional = true }
|
|
kvm_sys = { path = "kvm_sys", optional = true }
|
|
libc = "0.2.65"
|
|
libcras = "*"
|
|
minijail = "*" # provided by ebuild
|
|
msg_socket = { path = "msg_socket" }
|
|
net_util = { path = "net_util" }
|
|
p9 = "*"
|
|
protobuf = { version = "2.3", optional = true }
|
|
protos = { path = "protos", optional = true }
|
|
rand_ish = { path = "rand_ish" }
|
|
remain = "*"
|
|
resources = { path = "resources" }
|
|
sync = { path = "sync" }
|
|
tempfile = "*"
|
|
thiserror = { version = "1.0.20", optional = true }
|
|
vhost = { path = "vhost" }
|
|
vm_control = { path = "vm_control" }
|
|
acpi_tables = { path = "acpi_tables" }
|
|
vm_memory = { path = "vm_memory" }
|
|
|
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
|
x86_64 = { path = "x86_64" }
|
|
|
|
[target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies]
|
|
aarch64 = { path = "aarch64" }
|
|
|
|
[dev-dependencies]
|
|
base = "*"
|
|
|
|
[patch.crates-io]
|
|
assertions = { path = "assertions" }
|
|
audio_streams = { path = "../../third_party/adhd/audio_streams" } # ignored by ebuild
|
|
base = { path = "base" }
|
|
data_model = { path = "data_model" }
|
|
libcras = { path = "../../third_party/adhd/cras/client/libcras" } # ignored by ebuild
|
|
libvda = { path = "../../platform2/arc/vm/libvda/rust" } # ignored by ebuild
|
|
minijail = { path = "../../aosp/external/minijail/rust/minijail" } # ignored by ebuild
|
|
p9 = { path = "../../platform2/vm_tools/p9" } # ignored by ebuild
|
|
sync = { path = "sync" }
|
|
syscall_defines = { path = "syscall_defines" }
|
|
sys_util = { path = "sys_util" }
|
|
tempfile = { path = "tempfile" }
|
|
wire_format_derive = { path = "../../platform2/vm_tools/p9/wire_format_derive" } # ignored by ebuild
|