mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
e2d00176e5
For some PCI device, its MMIO bar size may not be page size aligned. When setting user memory region for such bar with not aligned size, KVM will report failure back and failed to map that bar. As current crosvm can continue run with this failure, the performance will be hurt as each time when guest is accessing this bar, it will trap to hypervisor. To resolve this, extend the size to be page size aligned when setting user memory region in KVM and do DMA map. This should be safe to extend because the mmap actually rounds up the mmap size to be page aligned. BUG=None TEST=boot vm with a passthrough device whose bar has unaligned size Change-Id: Ic816984ec503edf7f12da4893b78d996ebf93976 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2717448 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dylan Reid <dgreid@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |