crosvm/resources
Tina Zhang c834b038c2 devices: virtio: iommu: get iova_max_addr according to ranges' info
Previously the iova_max_addr was got according to the cpu physical
address size. Since the cpu physical address is no more than the maximum
iova size provided by hardware iommu, the iova space size can work for
any passthrough devices. But it may not utilize the whole iova space, as
the iova size isn't got from the underlying hardware iommu.

This patch introduces a way to get iova_max_addr according to the iommu
ranges' info, therefore the iova_max_addr can be precisely calculated.

BUG=b:185084350
TEST=Boot a crosvm guest with vIOMMU enabled

Change-Id: I4ed37bf158208d61663a4bf474549df4fce3adf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3580373
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-04-28 04:43:11 +00:00
..
src devices: virtio: iommu: get iova_max_addr according to ranges' info 2022-04-28 04:43:11 +00:00
Cargo.toml