[PW_SID:1118585] [v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup#2164
[PW_SID:1118585] [v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup#2164linux-riscv-bot wants to merge 2 commits into
Conversation
…rdware lockup When the RISC-V IOMMU encounters an illegal command, the hardware stops processing and the HEAD register remains pointing at the illegal command. If software does not handle this properly, the hardware will be stuck at this index indefinitely, preventing any further command queue operations. This patch implements a recovery mechanism by replacing the illegal command with a dummy IOFENCE instruction (all operands are zero): 1. Prevents hardware lockup: By overwriting the illegal command with a valid instruction, the hardware can continue processing from the current position instead of being stuck. 2. Enables user recovery: After replacing the illegal command, the user/driver has an opportunity to retry the original failed operation rather than losing all queued work. 3. Minimal hardware impact: A dummy IOFENCE behaves as a NOP, it it performs no cache invalidation operations and has no side effects on the system state. This is the safest replacement instruction. Signed-off-by: Zong Li <zong.li@sifive.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
|
Patch 1: "[v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup" |
89be0ce to
dc5ff20
Compare
PR for series 1118585 applied to workflow__riscv__fixes
Name: [v2] iommu/riscv: Replace illegal command with dummy IOFENCE to prevent hardware lockup
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1118585
Version: 2