2017-05-02 00:57:18 +00:00
|
|
|
[package]
|
|
|
|
name = "crosvm"
|
|
|
|
version = "0.1.0"
|
|
|
|
authors = ["The Chromium OS Authors"]
|
2019-03-13 03:52:19 +00:00
|
|
|
edition = "2018"
|
2017-05-02 00:57:18 +00:00
|
|
|
|
2019-08-01 00:07:27 +00:00
|
|
|
[lib]
|
|
|
|
path = "src/crosvm.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "crosvm"
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
2017-05-02 00:57:18 +00:00
|
|
|
[profile.release]
|
|
|
|
panic = 'abort'
|
2018-10-15 22:40:09 +00:00
|
|
|
overflow-checks = true
|
2017-05-02 00:57:18 +00:00
|
|
|
|
2017-11-09 01:33:46 +00:00
|
|
|
[workspace]
|
2019-01-18 12:00:36 +00:00
|
|
|
members = ["qcow_utils"]
|
2018-12-20 07:44:11 +00:00
|
|
|
exclude = [
|
|
|
|
"assertions",
|
2020-06-21 04:45:32 +00:00
|
|
|
"base",
|
2019-11-23 00:41:01 +00:00
|
|
|
"cros_async",
|
2018-12-20 07:44:11 +00:00
|
|
|
"data_model",
|
2019-04-06 21:30:04 +00:00
|
|
|
"rand_ish",
|
2018-12-20 07:44:11 +00:00
|
|
|
"sync",
|
|
|
|
"sys_util",
|
|
|
|
"syscall_defines",
|
2019-04-11 00:59:15 +00:00
|
|
|
"tempfile",
|
2020-07-21 03:21:11 +00:00
|
|
|
"vm_memory",
|
2018-12-20 07:44:11 +00:00
|
|
|
]
|
2017-11-09 01:33:46 +00:00
|
|
|
|
2018-01-17 01:35:27 +00:00
|
|
|
[features]
|
2020-12-14 23:20:45 +00:00
|
|
|
default = ["audio", "gpu"]
|
2020-08-03 03:09:41 +00:00
|
|
|
chromeos = ["base/chromeos"]
|
2018-05-10 17:25:58 +00:00
|
|
|
default-no-sandbox = []
|
2020-03-18 18:00:47 +00:00
|
|
|
audio = ["devices/audio"]
|
2017-09-14 02:15:43 +00:00
|
|
|
gpu = ["devices/gpu"]
|
2020-06-21 04:45:32 +00:00
|
|
|
plugin = ["protos/plugin", "crosvm_plugin", "kvm", "kvm_sys", "protobuf"]
|
2020-11-10 09:24:04 +00:00
|
|
|
power-monitor-powerd = ["arch/power-monitor-powerd"]
|
2019-04-06 21:30:04 +00:00
|
|
|
tpm = ["devices/tpm"]
|
2019-12-06 13:24:40 +00:00
|
|
|
video-decoder = ["devices/video-decoder"]
|
|
|
|
video-encoder = ["devices/video-encoder"]
|
2019-04-06 21:30:04 +00:00
|
|
|
wl-dmabuf = ["devices/wl-dmabuf", "gpu_buffer", "resources/wl-dmabuf"]
|
2019-04-16 22:09:20 +00:00
|
|
|
x = ["devices/x"]
|
2020-12-14 23:20:45 +00:00
|
|
|
virgl_renderer_next = ["rutabaga_gfx/virgl_renderer_next"]
|
2019-07-08 23:14:24 +00:00
|
|
|
composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
|
2020-12-14 23:20:45 +00:00
|
|
|
virgl_renderer = ["devices/virgl_renderer"]
|
2020-01-30 18:00:36 +00:00
|
|
|
gfxstream = ["devices/gfxstream"]
|
2020-10-21 06:57:33 +00:00
|
|
|
gdb = ["gdbstub", "thiserror", "arch/gdb", "vm_control/gdb", "x86_64/gdb"]
|
2018-01-17 01:35:27 +00:00
|
|
|
|
2017-05-02 00:57:18 +00:00
|
|
|
[dependencies]
|
2018-02-14 06:09:43 +00:00
|
|
|
arch = { path = "arch" }
|
2019-04-12 23:57:48 +00:00
|
|
|
assertions = { path = "assertions" }
|
2019-01-07 18:33:48 +00:00
|
|
|
audio_streams = "*"
|
2020-08-03 03:09:41 +00:00
|
|
|
base = "*"
|
2018-05-22 18:22:13 +00:00
|
|
|
bit_field = { path = "bit_field" }
|
2019-04-06 21:30:04 +00:00
|
|
|
crosvm_plugin = { path = "crosvm_plugin", optional = true }
|
|
|
|
data_model = "*"
|
2017-10-06 22:26:46 +00:00
|
|
|
devices = { path = "devices" }
|
2019-07-02 23:54:05 +00:00
|
|
|
disk = { path = "disk" }
|
2019-01-16 00:23:48 +00:00
|
|
|
enumn = { path = "enumn" }
|
2020-10-21 06:57:33 +00:00
|
|
|
gdbstub = { version = "0.4.0", optional = true }
|
2018-04-26 00:49:56 +00:00
|
|
|
gpu_buffer = { path = "gpu_buffer", 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 }
|
2020-06-21 04:45:32 +00:00
|
|
|
hypervisor = { path = "hypervisor" }
|
2018-02-02 01:49:01 +00:00
|
|
|
kernel_cmdline = { path = "kernel_cmdline" }
|
2017-05-02 00:57:18 +00:00
|
|
|
kernel_loader = { path = "kernel_loader" }
|
2020-06-21 04:45:32 +00:00
|
|
|
kvm = { path = "kvm", optional = true }
|
|
|
|
kvm_sys = { path = "kvm_sys", optional = true }
|
2020-06-22 21:49:25 +00:00
|
|
|
libc = "0.2.65"
|
2019-01-22 07:22:25 +00:00
|
|
|
libcras = "*"
|
2020-06-19 14:19:48 +00:00
|
|
|
minijail = "*" # provided by ebuild
|
2019-04-06 21:30:04 +00:00
|
|
|
msg_socket = { path = "msg_socket" }
|
2017-09-28 04:04:03 +00:00
|
|
|
net_util = { path = "net_util" }
|
2020-10-27 09:33:02 +00:00
|
|
|
p9 = "*"
|
2019-04-11 00:59:15 +00:00
|
|
|
protobuf = { version = "2.3", optional = true }
|
2019-04-06 03:34:50 +00:00
|
|
|
protos = { path = "protos", optional = true }
|
2019-01-14 22:19:04 +00:00
|
|
|
rand_ish = { path = "rand_ish" }
|
2019-03-11 19:36:30 +00:00
|
|
|
remain = "*"
|
2019-04-06 21:30:04 +00:00
|
|
|
resources = { path = "resources" }
|
|
|
|
sync = { path = "sync" }
|
2020-08-06 01:50:47 +00:00
|
|
|
tempfile = "*"
|
2020-10-21 06:57:33 +00:00
|
|
|
thiserror = { version = "1.0.20", optional = true }
|
2019-04-06 21:30:04 +00:00
|
|
|
vhost = { path = "vhost" }
|
|
|
|
vm_control = { path = "vm_control" }
|
2019-11-01 07:18:13 +00:00
|
|
|
acpi_tables = { path = "acpi_tables" }
|
2020-07-21 03:21:11 +00:00
|
|
|
vm_memory = { path = "vm_memory" }
|
2017-05-02 00:57:18 +00:00
|
|
|
|
2017-08-31 00:07:01 +00:00
|
|
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
|
|
|
x86_64 = { path = "x86_64" }
|
2018-01-17 01:59:03 +00:00
|
|
|
|
2018-02-27 01:27:40 +00:00
|
|
|
[target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies]
|
|
|
|
aarch64 = { path = "aarch64" }
|
|
|
|
|
2018-01-17 01:59:03 +00:00
|
|
|
[dev-dependencies]
|
2020-08-03 03:09:41 +00:00
|
|
|
base = "*"
|
2018-12-20 07:44:11 +00:00
|
|
|
|
|
|
|
[patch.crates-io]
|
|
|
|
assertions = { path = "assertions" }
|
2018-12-06 19:47:18 +00:00
|
|
|
audio_streams = { path = "../../third_party/adhd/audio_streams" } # ignored by ebuild
|
2020-08-03 03:09:41 +00:00
|
|
|
base = { path = "base" }
|
2018-12-20 07:44:11 +00:00
|
|
|
data_model = { path = "data_model" }
|
2019-01-22 07:22:25 +00:00
|
|
|
libcras = { path = "../../third_party/adhd/cras/client/libcras" } # ignored by ebuild
|
2019-12-06 13:24:40 +00:00
|
|
|
libvda = { path = "../../platform2/arc/vm/libvda/rust" } # ignored by ebuild
|
2020-06-19 14:19:48 +00:00
|
|
|
minijail = { path = "../../aosp/external/minijail/rust/minijail" } # ignored by ebuild
|
2020-09-11 08:33:25 +00:00
|
|
|
p9 = { path = "../../platform2/vm_tools/p9" } # ignored by ebuild
|
2018-12-20 07:44:11 +00:00
|
|
|
sync = { path = "sync" }
|
|
|
|
syscall_defines = { path = "syscall_defines" }
|
2020-08-03 03:09:41 +00:00
|
|
|
sys_util = { path = "sys_util" }
|
2019-04-11 00:59:15 +00:00
|
|
|
tempfile = { path = "tempfile" }
|
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
|
|
|
wire_format_derive = { path = "../../platform2/vm_tools/p9/wire_format_derive" } # ignored by ebuild
|