swap: move UffdList into a single file

We will add unit tests for UffdList. Having a single file for UffdList
is easier to write unit tests.

This adds a minor refactoring to register the main uffd to WaitContext
within UffdList logic. Also removed the comment for the main uffd
registeration due to blocking on fork because it is obsolete since we
don't use the fork feature of userfaultfd(2).

BUG=b:266898615
TEST=./tools/run_tests2

Change-Id: I53f6d9944d282f7a7528dd6882cd7527031af1b8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4562368
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Ningyuan Wang <ningyuan@google.com>
Commit-Queue: Shin Kawamura <kawasin@google.com>
3 files changed
tree: b6392b98ee5da4f9593fdc2f32b0fca2259aa954
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. anti_tamper/
  9. arch/
  10. argh_helpers/
  11. audio_util/
  12. base/
  13. bit_field/
  14. broker_ipc/
  15. common/
  16. crash_report/
  17. cros_async/
  18. cros_fdt/
  19. cros_tracing/
  20. cros_tracing_types/
  21. crosvm_cli/
  22. crosvm_control/
  23. crosvm_plugin/
  24. devices/
  25. disk/
  26. docs/
  27. e2e_tests/
  28. fuse/
  29. fuzz/
  30. gpu_display/
  31. hypervisor/
  32. infra/
  33. io_uring/
  34. jail/
  35. kernel_cmdline/
  36. kernel_loader/
  37. kvm/
  38. kvm_sys/
  39. libcras_stub/
  40. linux_input_sys/
  41. logo/
  42. media/
  43. metrics/
  44. net_sys/
  45. net_util/
  46. perfetto/
  47. power_monitor/
  48. prebuilts/
  49. proto_build_tools/
  50. protos/
  51. qcow_utils/
  52. resources/
  53. riscv64/
  54. rutabaga_gfx/
  55. sandbox/
  56. serde_keyvalue/
  57. src/
  58. swap/
  59. system_api/
  60. tests/
  61. third_party/
  62. tools/
  63. tpm2/
  64. tpm2-sys/
  65. tube_transporter/
  66. usb_sys/
  67. usb_util/
  68. vfio_sys/
  69. vhost/
  70. virtio_sys/
  71. vm_control/
  72. vm_memory/
  73. win_audio/
  74. win_util/
  75. x86_64/
  76. .dockerignore
  77. .envrc
  78. .gitignore
  79. .gitmodules
  80. .rustfmt.toml
  81. ARCHITECTURE.md
  82. Cargo.lock
  83. Cargo.toml
  84. CONTRIBUTING.md
  85. DIR_METADATA
  86. LICENSE
  87. mypy.ini
  88. OWNERS
  89. OWNERS_COUNCIL
  90. PRESUBMIT.cfg
  91. pyproject.toml
  92. README.chromeos.md
  93. README.md
  94. rust-toolchain
README.md

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.

Logo