mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
docs: Move code map to ARCHITECTURE
BUG=b:195003973 TEST=none Change-Id: Idfe9565354d661361010df91c83a9313d94462b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188674 Commit-Queue: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
909d7f3c05
commit
d38a34c038
2 changed files with 28 additions and 31 deletions
|
@ -221,3 +221,31 @@ HANDLEs on Windows), a module is provided for sending and receiving descriptors
|
|||
alongside the plain old bytes that serde consumes.
|
||||
|
||||
[minijail]: https://android.googlesource.com/platform/external/minijail
|
||||
|
||||
|
||||
## Code Map
|
||||
|
||||
Source code is organized into crates, each with their own unit tests.
|
||||
|
||||
- `crosvm` - The top-level binary front-end for using crosvm.
|
||||
- `devices` - Virtual devices exposed to the guest OS.
|
||||
- `kernel_loader` - Loads elf64 kernel files to a slice of memory.
|
||||
- `kvm_sys` - Low-level (mostly) auto-generated structures and constants for
|
||||
using KVM.
|
||||
- `kvm` - Unsafe, low-level wrapper code for using `kvm_sys`.
|
||||
- `net_sys` - Low-level (mostly) auto-generated structures and constants for
|
||||
creating TUN/TAP devices.
|
||||
- `net_util` - Wrapper for creating TUN/TAP devices.
|
||||
- `sys_util` - Mostly safe wrappers for small system facilities such as
|
||||
`eventfd` or `syslog`.
|
||||
- `syscall_defines` - Lists of syscall numbers in each architecture used to
|
||||
make syscalls not supported in `libc`.
|
||||
- `vhost` - Wrappers for creating vhost based devices.
|
||||
- `virtio_sys` - Low-level (mostly) auto-generated structures and constants
|
||||
for interfacing with kernel vhost support.
|
||||
- `vm_control` - IPC for the VM.
|
||||
- `x86_64` - Support code specific to 64 bit intel machines.
|
||||
|
||||
The `seccomp` folder contains minijail seccomp policy files for each sandboxed
|
||||
device. Because some syscalls vary by architecture, the seccomp policies are
|
||||
split by architecture.
|
||||
|
|
|
@ -81,34 +81,3 @@ The `use` statements for each module should be grouped in this order
|
|||
crosvm uses the [remain](https://github.com/dtolnay/remain) crate to keep error
|
||||
enums sorted, along with the `#[sorted]` attribute to keep their corresponding
|
||||
match statements in the same order.
|
||||
|
||||
### Code Overview
|
||||
|
||||
The crosvm source code is written in Rust and C. To build, crosvm generally
|
||||
requires the most recent stable version of rustc.
|
||||
|
||||
Source code is organized into crates, each with their own unit tests. These
|
||||
crates are:
|
||||
|
||||
- `crosvm` - The top-level binary front-end for using crosvm.
|
||||
- `devices` - Virtual devices exposed to the guest OS.
|
||||
- `kernel_loader` - Loads elf64 kernel files to a slice of memory.
|
||||
- `kvm_sys` - Low-level (mostly) auto-generated structures and constants for
|
||||
using KVM.
|
||||
- `kvm` - Unsafe, low-level wrapper code for using `kvm_sys`.
|
||||
- `net_sys` - Low-level (mostly) auto-generated structures and constants for
|
||||
creating TUN/TAP devices.
|
||||
- `net_util` - Wrapper for creating TUN/TAP devices.
|
||||
- `sys_util` - Mostly safe wrappers for small system facilities such as
|
||||
`eventfd` or `syslog`.
|
||||
- `syscall_defines` - Lists of syscall numbers in each architecture used to
|
||||
make syscalls not supported in `libc`.
|
||||
- `vhost` - Wrappers for creating vhost based devices.
|
||||
- `virtio_sys` - Low-level (mostly) auto-generated structures and constants
|
||||
for interfacing with kernel vhost support.
|
||||
- `vm_control` - IPC for the VM.
|
||||
- `x86_64` - Support code specific to 64 bit intel machines.
|
||||
|
||||
The `seccomp` folder contains minijail seccomp policy files for each sandboxed
|
||||
device. Because some syscalls vary by architecture, the seccomp policies are
|
||||
split by architecture.
|
||||
|
|
Loading…
Reference in a new issue