diff options
author | Yanfei Xu <yanfei.xu@intel.com> | 2023-08-09 20:48:05 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-08-09 17:46:19 +0200 |
commit | fb5f50a43d9fd44fd6bc4f4dbcf9d3ec5b556558 (patch) | |
tree | dea317c16a9306b582642e60cc018a1f8228834d /rust | |
parent | 8a3b8e63f8371c1247b7aa24ff9c5312f1a6948b (diff) | |
download | linux-stable-fb5f50a43d9fd44fd6bc4f4dbcf9d3ec5b556558.tar.gz linux-stable-fb5f50a43d9fd44fd6bc4f4dbcf9d3ec5b556558.tar.bz2 linux-stable-fb5f50a43d9fd44fd6bc4f4dbcf9d3ec5b556558.zip |
iommu/vt-d: Fix to convert mm pfn to dma pfn
For the case that VT-d page is smaller than mm page, converting dma pfn
should be handled in two cases which are for start pfn and for end pfn.
Currently the calculation of end dma pfn is incorrect and the result is
less than real page frame number which is causing the mapping of iova
always misses some page frames.
Rename the mm_to_dma_pfn() to mm_to_dma_pfn_start() and add a new helper
for converting end dma pfn named mm_to_dma_pfn_end().
Signed-off-by: Yanfei Xu <yanfei.xu@intel.com>
Link: https://lore.kernel.org/r/20230625082046.979742-1-yanfei.xu@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions