crosvm/devices/Cargo.toml

59 lines
1.8 KiB
TOML
Raw Normal View History

[package]
name = "devices"
version = "0.1.0"
authors = ["The Chromium OS Authors"]
edition = "2018"
[features]
audio = []
rutabaga_gfx: an electrifying possibility 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>
2020-10-20 01:31:13 +00:00
gpu = ["gpu_buffer", "gpu_display", "rutabaga_gfx/virgl_renderer"]
tpm = ["protos/trunks", "tpm2"]
video-decoder = ["libvda"]
video-encoder = ["libvda"]
wl-dmabuf = []
x = ["gpu_display/x"]
rutabaga_gfx: an electrifying possibility 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>
2020-10-20 01:31:13 +00:00
gfxstream = ["gpu", "rutabaga_gfx/gfxstream"]
[dependencies]
acpi_tables = {path = "../acpi_tables" }
audio_streams = "*"
bit_field = { path = "../bit_field" }
cros_async = { path = "../cros_async" }
data_model = { path = "../data_model" }
disk = { path = "../disk" }
enumn = { path = "../enumn" }
fuse = {path = "../fuse" }
gpu_buffer = { path = "../gpu_buffer", optional = true }
gpu_display = { path = "../gpu_display", optional = true }
rutabaga_gfx: an electrifying possibility 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>
2020-10-20 01:31:13 +00:00
rutabaga_gfx = { path = "../rutabaga_gfx", optional = true }
hypervisor = { path = "../hypervisor" }
kvm_sys = { path = "../kvm_sys" }
libc = "*"
libcras = "*"
libvda = { version = "*", optional = true }
linux_input_sys = { path = "../linux_input_sys" }
minijail = "*"
msg_on_socket_derive = { path = "../msg_socket/msg_on_socket_derive" }
msg_socket = { path = "../msg_socket" }
net_sys = { path = "../net_sys" }
net_util = { path = "../net_util" }
p9 = "*"
power_monitor = { path = "../power_monitor" }
protos = { path = "../protos", optional = true }
devices: fs: Fix posix acl handling Posix acls are a truly incredible example of API design. The presence of a default posix acl in a directory completely changes the meaning of the `mode` parameter for all system call that create inodes. However, this new behavior only applies when the inode is first created and not for any subsequent operations that use the mode, like fchmod. When a directory has a default posix acl, all inodes created in that directory get the permissions specified in the default acl. The mode parameter is treated like a umask where any permissions allowed by the default acl that are not allowed by the mode parameter are blocked. The actual umask is ignored in this case. So to handle this properly we need to set FUSE_DONT_MASK to prevent the kernel driver from preemptively applying the umask. Then we have to check if the parent directory has a default posix acl and only apply the umask to the mode if it does not. This also means that we cannot use `mkdtemp` because that always creates directories with a mode of 0o700 and since the default posix acl calculation only applies on creation and not on later operations, we need to apply the proper mode in the very beginning. BUG=b:159285544,b:152806644 TEST=vm.Virtiofs. Use a test program to create files/directories in directories that have a default acl and ones that don't, and verify that the mode is correctly set after creation Change-Id: Ieca8ac9db391feebe5719630c5f3b57b04b71533 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2260253 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org> Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
2020-06-23 08:12:03 +00:00
rand_ish = { path = "../rand_ish" }
remain = "*"
resources = { path = "../resources" }
sync = { path = "../sync" }
base = { path = "../base" }
syscall_defines = { path = "../syscall_defines" }
tpm2 = { path = "../tpm2", optional = true }
usb_util = { path = "../usb_util" }
vfio_sys = { path = "../vfio_sys" }
vhost = { path = "../vhost" }
virtio_sys = { path = "../virtio_sys" }
vm_control = { path = "../vm_control" }
vm_memory = { path = "../vm_memory" }
[dev-dependencies]
tempfile = { path = "../tempfile" }