mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
ed1572d78c
For bridge's memroy and prefetch memory window, current the limit is smaller than the base, this means pcie rp doesn't support this window, but OS still allocates 2M memroy window and 2M prefetch memory window for it, this has two problems: a. kernel allocates mmio, but crosvm's system allocator doesn't capture this allocation and crosvm still use system allocator to allocate mmio for hotplug in device, so it may have conflict between kernel and crosvm. b. the 2MB window is too small, as the added device behind this bridge is allocated mmio from this window by kernel, if device required mmio is large than 2MB, the device couldn't work. This commit preallocates 8MB memory window and 64MB prefetch memory window for one pcie rp, and let kernel allocate mmio for its children devices from this window, kernel also maintains the allocation and free of this window, crosvm system allocator doesn't care about which device own the segment of this window. BUG=b:185084350 TEST=Boot a guest and check pcie rp bridge window's base, limit and size Change-Id: I566a2d81b458da1d2d5f07b689fa898453586adc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3319706 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |