devices: virtio: iommu: narrow the pci range of viot

Now we can use option `--pcie-root-port` to create a virtual pcie root
port with some attributes same as host. So a vfio device may be
connected to it statically.

And only hot-pluggable devices and vfio devices with option
`iommu=viommu` are needed to be attached to virtio-iommu. So we just
append the sub pci range of a leaf node root port to viot.

BUG=b:185084350
TEST=Boot a guest with option '--virtio-iommu' and '--pcie-root-port',
check the PCI range node in guest viot.

Change-Id: Iff59b5210fb85511370ede19bf1ca2095b4d603b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3541469
Reviewed-by: David Stevens <stevensd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
1 file changed
tree: a07689edbcd54477d710d57399d11f3f654cbcd7
  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. cros_async/
  13. crosvm-fuzz/
  14. crosvm_control/
  15. crosvm_plugin/
  16. devices/
  17. disk/
  18. docs/
  19. fuse/
  20. gpu_display/
  21. hypervisor/
  22. infra/
  23. integration_tests/
  24. io_uring/
  25. kernel_cmdline/
  26. kernel_loader/
  27. kvm/
  28. kvm_sys/
  29. libcras_stub/
  30. libvda/
  31. linux_input_sys/
  32. logo/
  33. net_sys/
  34. net_util/
  35. power_monitor/
  36. protos/
  37. qcow_utils/
  38. resources/
  39. rutabaga_gfx/
  40. seccomp/
  41. serde_keyvalue/
  42. src/
  43. system_api_stub/
  44. tests/
  45. third_party/
  46. tools/
  47. tpm2/
  48. tpm2-sys/
  49. usb_sys/
  50. usb_util/
  51. vfio_sys/
  52. vhost/
  53. virtio_sys/
  54. vm_control/
  55. vm_memory/
  56. win_util/
  57. x86_64/
  58. .dockerignore
  59. .gitignore
  60. .gitmodules
  61. .rustfmt.toml
  62. ARCHITECTURE.md
  63. Cargo.toml
  64. CONTRIBUTING.md
  65. LICENSE
  66. navbar.md
  67. OWNERS
  68. README.chromeos.md
  69. README.md
  70. run_tests
  71. rust-toolchain
  72. setup_cros_cargo.sh
  73. test_all
  74. 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