crosvm/common
Will Deacon b975546c3f vm-memory: mlock2(MLOCK_ONFAULT) guest memory for protected VMs
By default, the memory of a protected VM is inaccessible to the host
and crosvm. Consequently, attempts to access guest memory are fatal and
must be avoided in order for the guest to run.

Mlock guest pages as they are faulted in for protected VMs, ensuring
that the host doesn't try to age or swap them out as a result of memory
pressure.

Bug: b:204298056
Test: cargo test on x86 and arm64
Cc: Quentin Perret <qperret@google.com>
Cc: Andrew Walbran <qwandor@google.com>
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I618ec1e8b1136a47a8b3ef563e45bc41d75ab517
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3257689
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-11-09 18:59:20 +00:00
..
assertions Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
audio_streams Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
base vm-memory: mlock2(MLOCK_ONFAULT) guest memory for protected VMs 2021-11-09 18:59:20 +00:00
cros-fuzz Add newlines to end of Cargo.toml files. 2021-08-17 20:20:41 +00:00
cros_async Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
data_model Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
enumn Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
io_uring Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
p9 Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
sync Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
sys_util vm-memory: mlock2(MLOCK_ONFAULT) guest memory for protected VMs 2021-11-09 18:59:20 +00:00
README.md Import cros-fuzz and p9 into crosvm/common 2021-08-03 02:25:01 +00:00

Crosvm General Purpose Libraries

The crates in this folder are general purpose libraries used by other projects in ChromeOS as well.

To make them accessible independendly of crosvm, each of these crates is excluded from the crosvm workspace.

List of libraries

  • cros-fuzz: Support crate for fuzzing rust code in ChromeOS
  • p9: Server implementation of the 9p file system protocol