mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 01:16:50 +00:00
No description
40920e7278
Previously, the Vcpu handle_io() and handle_mmio() functions used an IoOperation containing a fixed-length data array to represent a write and returning a fixed-length data array to represent a read, along with a separate size field to indicate how much of the fixed-length array should be read/written. This change uses Rust slices to represent the I/O data instead: - Write contains a &[u8] of data to be written. - Read contains a &mut [u8] to be filled with the read data. The new IoOperation matches the Bus read()/write() APIs more closely, and avoids the need for hypervisors and callers to convert between fixed-size arrays and slices. The Bus::read() function now always initializes the data slice before (potentially) calling a device's read() function. This ensures consistent results even if a device does not always fill out every data byte (for example, the default BusDevice read() handler that is a no-op) or if no device is found. This replaces the previous zeroing that would happen when initializing the read data array to return from handle_fn. Without this, the data slice may have had stale data from the previous MMIO/IO exit, depending on the hypervisor implementation. No functional change intended. BUG=b:359382839 TEST=tools/dev_container tools/presubmit Change-Id: Id88ebfa7ece5cc7466c010db2cbde303aeb97bf8 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5913962 Reviewed-by: Vaibhav Nagarnaik <vnagarnaik@google.com> Reviewed-by: Noah Gold <nkgold@google.com> Reviewed-by: Frederick Mayle <fmayle@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.cargo | ||
.config | ||
.devcontainer | ||
.github | ||
.vscode | ||
aarch64 | ||
acpi_tables | ||
android_audio | ||
arch | ||
argh_helpers | ||
audio_streams_conformance_test | ||
audio_util | ||
base | ||
base_tokio | ||
bit_field | ||
broker_ipc | ||
common | ||
cros_async | ||
cros_fdt | ||
cros_tracing | ||
cros_tracing_types | ||
crosvm_cli | ||
crosvm_control | ||
crosvm_plugin | ||
devices | ||
disk | ||
docs/book | ||
e2e_tests | ||
ext2 | ||
fuse | ||
fuzz | ||
gpu_display | ||
hypervisor | ||
infra | ||
io_uring | ||
jail | ||
kernel_cmdline | ||
kernel_loader | ||
kvm | ||
kvm_sys | ||
libcras_stub | ||
linux_input_sys | ||
logo | ||
media | ||
metrics | ||
metrics_events | ||
net_sys | ||
net_util | ||
perfetto | ||
power_monitor | ||
prebuilts | ||
proto_build_tools | ||
protos | ||
resources | ||
riscv64 | ||
rutabaga_gfx | ||
sandbox | ||
serde_keyvalue | ||
src | ||
swap | ||
system_api | ||
tests | ||
third_party | ||
tools | ||
tube_transporter | ||
usb_sys | ||
usb_util | ||
vendor | ||
vfio_sys | ||
vhost | ||
virtio_sys | ||
vm_control | ||
vm_memory | ||
win_audio | ||
win_util | ||
x86_64 | ||
.dockerignore | ||
.envrc | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
ARCHITECTURE.md | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
DIR_METADATA | ||
LICENSE | ||
mypy.ini | ||
OWNERS | ||
OWNERS_COUNCIL | ||
PRESUBMIT.cfg | ||
pyproject.toml | ||
README.chromeos.md | ||
README.md | ||
rust-toolchain |
crosvm - The ChromeOS Virtual Machine Monitor
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on ChromeOS devices.
- Documentation
- Announcements
- Developer Mailing List
- #crosvm on matrix.org
- Source code
- API doc, useful for searching API.
- For contribution, see the contributor guide. Mirror repository is available at GitHub for your convenience, but we don't accept bug reports or pull requests there.
- Public issue tracker
- For Googlers: See go/crosvm#filing-bugs.