linux: punch holes in guest memory for file mappings

Rather than manually adding special handling for regions where we want
to put --file-backed-mapping mappings, we can just iterate over those
regions before constructing the GuestMemory object so that there will be
no conflicts/overlaps between RAM and file-backed mappings.

BUG=b:188011323
TEST=Boot volteer-manatee and brya-manatee

Change-Id: I986f33460fa45cd1f85d849810e1f6934cc73c0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3489809
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
1 file changed
tree: b13ef56cf4731f1fa704d44b0909a7fec7e37213
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. aarch64/
  5. acpi_tables/
  6. arch/
  7. bin/
  8. bit_field/
  9. ci/
  10. common/
  11. crosvm-fuzz/
  12. crosvm_control/
  13. crosvm_plugin/
  14. devices/
  15. disk/
  16. docs/
  17. fuse/
  18. gpu_display/
  19. hypervisor/
  20. infra/
  21. integration_tests/
  22. kernel_cmdline/
  23. kernel_loader/
  24. kvm/
  25. kvm_sys/
  26. libcras_stub/
  27. libvda/
  28. linux_input_sys/
  29. logo/
  30. net_sys/
  31. net_util/
  32. power_monitor/
  33. protos/
  34. qcow_utils/
  35. resources/
  36. rutabaga_gfx/
  37. seccomp/
  38. src/
  39. system_api_stub/
  40. tests/
  41. third_party/
  42. tools/
  43. tpm2/
  44. tpm2-sys/
  45. usb_sys/
  46. usb_util/
  47. vfio_sys/
  48. vhost/
  49. virtio_sys/
  50. vm_control/
  51. vm_memory/
  52. x86_64/
  53. .dockerignore
  54. .gitignore
  55. .gitmodules
  56. .rustfmt.toml
  57. ARCHITECTURE.md
  58. Cargo.toml
  59. CONTRIBUTING.md
  60. LICENSE
  61. navbar.md
  62. OWNERS
  63. README.chromeos.md
  64. README.md
  65. run_tests
  66. rust-toolchain
  67. setup_cros_cargo.sh
  68. test_all
  69. unblocked_terms.txt
README.md

crosvm - The Chrome OS 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 Chrome OS 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 Chrome OS devices.

Logo