sync: rvck #309: iommu/riscv: add dma_wmb before cmpxchg_relaxed#243
Merged
Conversation
driver inclusion category: bugfix Link: RVCK-Project/rvck#308 -------------------------------- When using NVMe for PCIe peripherals on an RV multi-core CPU with IOMMU enabled, the command `fio --filename=/dev/nvme0n1 --ioengine=libaio --direct=1 --iodepth=256 --numjobs=8 --group_reporting=1 --bs=1M --time_based=1 --runtime=2 --rw=read --name=test_read_8 --thread=1` resulted a fault 15 exception during IOMMU testing. When multiple cores modify iommu page talbe simultaneously, executing riscv_iommu_map_pages or riscv_iommu_pte_alloc, an out-of-order iommu page table clearing problem can occur due to a memory barrier missing. It caused PTE being incorrectly cleared. Setting dma_wmb ensures that all previous DMA write operations have been completed before cmpxchg_relaxed. This issue is relatively rare and may only occur during stress testing. Signed-off-by: bailu <bai.lu5@zte.com.cn> Signed-off-by: liuqingtao <liu.qingtao2@zte.com.cn> [sync from rvck.] Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/29094299936 参数解析结果
测试完成 详细结果:
Kunit Test Result[13:02:07] Testing complete. Ran 482 tests: passed: 466, skipped: 16
Kernel Build Result
Check Patch Result
LAVA Check (qemu)
result: Lava check done!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync commits from rvck PR 309.
Source PR: RVCK-Project/rvck#309