linux/drivers/infiniband/hw/hns
Xi Wang 79d5208386 RDMA/hns: Fix wrong PBL offset when VA is not aligned to PAGE_SIZE
ROCE uses "VA % buf_page_size" to caclulate the offset in the PBL's first
page, the actual PA corresponding to the MR's VA is equal to MR's PA plus
this offset. The first PA in PBL has already been aligned to PAGE_SIZE
after calling ib_umem_get(), but the MR's VA may not. If the buf_page_size
is smaller than the PAGE_SIZE, this will lead the HW to access the wrong
memory because the offset is smaller than expected.

Fixes: 9b2cf76c9f ("RDMA/hns: Optimize PBL buffer allocation process")
Link: https://lore.kernel.org/r/1594726935-45666-1-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-07-16 09:55:01 -03:00
..
hns_roce_ah.c RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
hns_roce_alloc.c RDMA/hns: Change all page_shift to unsigned 2020-05-25 14:02:12 -03:00
hns_roce_cmd.c RDMA/hns: Optimize cmd init and mode selection for hip08 2019-09-16 10:52:20 -03:00
hns_roce_cmd.h RDMA/hns: Rename the functions used inside creating cq 2019-11-25 10:31:48 -04:00
hns_roce_common.h RDMA/hns: Remove unused code about assert 2020-05-25 14:02:12 -03:00
hns_roce_cq.c RDMA/hns: Add CQ flag instead of independent enable flag 2020-05-25 14:02:11 -03:00
hns_roce_db.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
hns_roce_device.h RDMA/hns: Fix a calltrace when registering MR from userspace 2020-06-18 10:47:04 -03:00
hns_roce_hem.c RDMA/hns: Change all page_shift to unsigned 2020-05-25 14:02:12 -03:00
hns_roce_hem.h RDMA/hns: Change all page_shift to unsigned 2020-05-25 14:02:12 -03:00
hns_roce_hw_v1.c RDMA/hns: Fix a calltrace when registering MR from userspace 2020-06-18 10:47:04 -03:00
hns_roce_hw_v1.h RDMA/hns: Remove asynchronic QP destroy 2019-04-24 10:55:31 -03:00
hns_roce_hw_v2_dfx.c RDMA/hns: Dump detailed driver-specific CQ 2019-04-08 13:05:25 -03:00
hns_roce_hw_v2.c RDMA/hns: Fix wrong assignment of lp_pktn_ini in QPC 2020-07-16 09:52:14 -03:00
hns_roce_hw_v2.h RDMA/hns: Remove redundant type cast for general pointers 2020-05-25 14:20:45 -03:00
hns_roce_main.c RDMA/hns: Remove unused code about assert 2020-05-25 14:02:12 -03:00
hns_roce_mr.c RDMA/hns: Fix wrong PBL offset when VA is not aligned to PAGE_SIZE 2020-07-16 09:55:01 -03:00
hns_roce_pd.c RDMA/hns: Unify format of prints 2020-03-26 16:52:26 -03:00
hns_roce_qp.c RDMA/hns: Remove redundant parameters from free_srq/qp_wrid() 2020-05-25 14:20:45 -03:00
hns_roce_restrack.c RDMA/hns: Fix memory leak on 'context' on error return path 2019-10-28 13:41:23 -03:00
hns_roce_srq.c RDMA/hns: Remove redundant parameters from free_srq/qp_wrid() 2020-05-25 14:20:45 -03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile RDMA/hns: Fix build error again 2019-10-29 16:16:54 -03:00