system_allocator: add mmio-address-range parameter

Linux expects that PCI bars lie within a compatible bridge window, which
are typically specified via _CRS objects in ACPI. This change adds an
option to restrict mmio allocations (i.e. PCI bars) to within a
specified set of ranges. The specified set of ranges is intersected with
the default mmio allocation ranges generated by the crosvm arch code to
produce the final mmio allocation ranges.

This change is required to remove pci=nocrs from the CrOS guest's kernel
command line flags. Removing that flag is a prerequisite for enabling
virtio-iommu, since without the configuration information from ACPI, the
kernel reserves all IOVAs in iova_reserve_pci_windows.

BUG=b:181736020
TEST=boot manatee w/o pci=nocrs kernel cmdline flag
TEST=tast run trogdor|hatch arc.Boot.vm

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