sync: rvck #114: Backport Linux RISC-V IOMMU Support#166
Merged
Conversation
mainline inclusion from mainline-v6.13-rc4 commit d5f88acdd6ff84607043a6845b81e4be148f9fd9 category: feature bugzilla: RVCK-Project/rvck#112 -------------------------------- Apply platform_device_msi_init_and_alloc_irqs() to add support for MSIs when the IOMMU is a platform device. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 5883231)
mainline inclusion from mainline-v6.13-rc7 commit 8d8d3752c0a4f7fb072352837cbdbf57c02df239 category: feature bugzilla: RVCK-Project/rvck#112 -------------------------------- Changing cqen/fqen/pqen from 0 to 1 sets the cqh/fqt/pqt registers to 0. But the cqt/fqh/pqh registers are left unmodified. This commit resets cqt/fqh/pqh registers to ensure corresponding queues are empty before being enabled during initialization. Signed-off-by: Xu Lu <luxu.kernel@bytedance.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit bb1a4c9)
mainline inclusion from mainline-v6.13-rc7 commit 8d8d3752c0a4f7fb072352837cbdbf57c02df239 category: feature bugzilla: RVCK-Project/rvck#112 -------------------------------- Changing cqen/fqen/pqen from 0 to 1 sets the cqh/fqt/pqt registers to 0. But the cqt/fqh/pqh registers are left unmodified. This commit resets cqt/fqh/pqh registers to ensure corresponding queues are empty before being enabled during initialization. Signed-off-by: Xu Lu <luxu.kernel@bytedance.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit ee4dacd)
mainline inclusion from mainline-v6.13 commit 10c62c38b073ecea775b7e23fa7c7a3995a84ff3 category: feature bugzilla: RVCK-Project/rvck#112 -------------------------------- When __BITS_PER_LONG == 32, size_t is defined as unsigned int rather than unsigned long. Therefore, we should use size_t to avoid type-checking errors. Fixes: 488ffbf18171 ("iommu/riscv: Paging domain support") Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 6fab9ba)
mainline inclusion from mainline-v6.17-rc3 commit 99d4d1a070870aa08163af8ce0522992b7f35d8c category: feature bugzilla: RVCK-Project/rvck#112 -------------------------------- The riscv_iommu_pte_fetch() function returns either NULL for unmapped/never-mapped iova, or a valid leaf pte pointer that requires no further validation. riscv_iommu_iova_to_phys() failed to handle NULL returns. Prevent null pointer dereference in riscv_iommu_iova_to_phys(), and remove the pte validation. Fixes: 488ffbf18171 ("iommu/riscv: Paging domain support") Cc: Tomasz Jeznach <tjeznach@rivosinc.com> Signed-off-by: XianLiang Huang <huangxianliang@lanxincomputing.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit bc18ef0)
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/24122352603 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[07:03:55] Testing complete. Ran 454 tests: passed: 442, skipped: 12 Kernel Build ResultKernel build failed. Check Patch Result
|
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 #114.
Source PR: RVCK-Project/rvck#114
Commits
58832315d01aiommu/riscv: Add support for platform msibb1a4c92062ciommu/riscv: Empty iommu queue before enabling itee4dacd6f8f2iommu/riscv: Add shutdown function for iommu driver6fab9babde3ciommu/riscv: Fixup compile warningbc18ef01f8d4iommu/riscv: prevent NULL deref in iova_to_phys