devices: bus: add BusDevice function to get ranges

When device's bar are reallocated, all the old resource ranges should be
deleted, the new resouce ranges shoud be added, this commit add the
interface to get device mmmio/io old/new ranges.

BUG=b:174705596
TEST=Boot a vm, monitor device bar reallocation and check function

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