Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bus/pci: align next mapping address on page boundary
[ upstream commit d25ab4b ] Currently, the next address picked by PCI mapping infrastructure may be page-unaligned due to BAR length being smaller than page size. This leads to a situation where the requested map address is invalid, resulting in mmap() call returning an arbitrary address, which will later interfere with device BAR mapping in secondary processes. Fix it by always aligning the next requested address on page boundary. Fixes: c752998 ("pci: introduce library and driver") Signed-off-by: Xiaofeng Deng <dengxiaofeng@huawei.com> Signed-off-by: Wangyu (Eric) <seven.wangyu@huawei.com> Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Gavin Hu <gavin.hu@arm.com>
- Loading branch information