fix memory size when static swiotlb is enabled

Previously, if `--mem` was set to 100MB and `--swiotlb` to 1MB, then
we'd essentially allocate 101MB of RAM for the guest and tell it about a
single 101MB memory region in the FDT (adjacent regions are merged in
the FDT). In contrast, for hypervisors that don't require static
swiotlb, we'd only allocate 100MB of RAM (and then the guest would need
to choose 1MB of its own memory to dedicate to this purpose).

Now both cases will get the same RAM size.

Removed the swiotlb reference from memory_layout.md since it is part of
the RAM region from the perspective of the guest. The need for the
static swiotlb to be created as a separate memslot is more of a
hypervisor implementation detail I think.

BUG=b:346770542

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