* PRI support in arm-smmu-v3 driver @ 2025-11-25 8:52 Pavan Kondeti 2025-11-25 18:00 ` Will Deacon 0 siblings, 1 reply; 4+ messages in thread From: Pavan Kondeti @ 2025-11-25 8:52 UTC (permalink / raw) To: linux-arm-kernel, iommu, jean-philippe Hi I am trying to understand IO fault handling in Linux w/ SMMUv3. While reading the code, I understand that SVA domain creation allows taking IO pagefaults. arm_smmu_enable_iopf() checks if the master support stall upon fault feature or not. How do we handle page faults for PCIe devices, for which transactions cannot safely be stalled? IIUC, The PRI handling in the driver i.e arm_smmu_priq_thread()->arm_smmu_handle_ppr() is not doing anything. In the SVA support for SMMUv3 series v7, I see the support for PRI via "Add support for PRI" patch [1] but it is not merged. Can you please clarify if we can support SVA with PCIe devices w/o pinning the memory? [1] https://lore.kernel.org/all/20200519175502.2504091-25-jean-philippe@linaro.org/ Thansk, Pavan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PRI support in arm-smmu-v3 driver 2025-11-25 8:52 PRI support in arm-smmu-v3 driver Pavan Kondeti @ 2025-11-25 18:00 ` Will Deacon 2025-11-25 18:03 ` Jason Gunthorpe 0 siblings, 1 reply; 4+ messages in thread From: Will Deacon @ 2025-11-25 18:00 UTC (permalink / raw) To: Pavan Kondeti Cc: linux-arm-kernel, iommu, jean-philippe, jgg, praan, smostafa, robin.murphy [+iommu list and usual suspects] Hi Pavan, On Tue, Nov 25, 2025 at 02:22:05PM +0530, Pavan Kondeti wrote: > I am trying to understand IO fault handling in Linux w/ SMMUv3. While reading > the code, I understand that SVA domain creation allows taking IO pagefaults. > arm_smmu_enable_iopf() checks if the master support stall upon fault > feature or not. How do we handle page faults for PCIe devices, for which > transactions cannot safely be stalled? IIUC, The PRI handling in the > driver i.e arm_smmu_priq_thread()->arm_smmu_handle_ppr() is not doing > anything. In the SVA support for SMMUv3 series v7, I see the support for > PRI via "Add support for PRI" patch [1] but it is not merged. > > Can you please clarify if we can support SVA with PCIe devices w/o > pinning the memory? > > [1] > https://lore.kernel.org/all/20200519175502.2504091-25-jean-philippe@linaro.org/ The only SVA client we've had for SMMUv3 in the upstream kernel is the "uacce" thing from HiSilicon which is a platform device (rather than a PCIe device) and so I think the PRI support just fell by the wayside due to lack of an upstream user and no ability to test it. I'm not sure whether or not Jason has plans to implement PRI but maybe it's something you could help with if you have hardware? Will ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PRI support in arm-smmu-v3 driver 2025-11-25 18:00 ` Will Deacon @ 2025-11-25 18:03 ` Jason Gunthorpe 2025-12-04 18:19 ` Jonathan Cameron 0 siblings, 1 reply; 4+ messages in thread From: Jason Gunthorpe @ 2025-11-25 18:03 UTC (permalink / raw) To: Will Deacon Cc: Pavan Kondeti, linux-arm-kernel, iommu, jean-philippe, praan, smostafa, robin.murphy On Tue, Nov 25, 2025 at 06:00:07PM +0000, Will Deacon wrote: > [+iommu list and usual suspects] > > Hi Pavan, > > On Tue, Nov 25, 2025 at 02:22:05PM +0530, Pavan Kondeti wrote: > > I am trying to understand IO fault handling in Linux w/ SMMUv3. While reading > > the code, I understand that SVA domain creation allows taking IO pagefaults. > > arm_smmu_enable_iopf() checks if the master support stall upon fault > > feature or not. How do we handle page faults for PCIe devices, for which > > transactions cannot safely be stalled? IIUC, The PRI handling in the > > driver i.e arm_smmu_priq_thread()->arm_smmu_handle_ppr() is not doing > > anything. In the SVA support for SMMUv3 series v7, I see the support for > > PRI via "Add support for PRI" patch [1] but it is not merged. > > > > Can you please clarify if we can support SVA with PCIe devices w/o > > pinning the memory? > > > > [1] > > https://lore.kernel.org/all/20200519175502.2504091-25-jean-philippe@linaro.org/ > > The only SVA client we've had for SMMUv3 in the upstream kernel is the > "uacce" thing from HiSilicon which is a platform device (rather than a > PCIe device) and so I think the PRI support just fell by the wayside due > to lack of an upstream user and no ability to test it. Right, we only support "stall" mode in the driver, not PRI right now. PRI has a bunch of differences at the SMMU level. > I'm not sure whether or not Jason has plans to implement PRI but maybe > it's something you could help with if you have hardware? I've been waiting for someone who has HW to take this on. Honestly, I'm not entirely sure what the missing gaps are, at least I think we need to get the PRI information and package it into the fault queue and link it back to a PRI response. Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PRI support in arm-smmu-v3 driver 2025-11-25 18:03 ` Jason Gunthorpe @ 2025-12-04 18:19 ` Jonathan Cameron 0 siblings, 0 replies; 4+ messages in thread From: Jonathan Cameron @ 2025-12-04 18:19 UTC (permalink / raw) To: Jason Gunthorpe Cc: Will Deacon, Pavan Kondeti, linux-arm-kernel, iommu, jean-philippe, praan, smostafa, robin.murphy On Tue, 25 Nov 2025 14:03:53 -0400 Jason Gunthorpe <jgg@nvidia.com> wrote: > On Tue, Nov 25, 2025 at 06:00:07PM +0000, Will Deacon wrote: > > [+iommu list and usual suspects] > > > > Hi Pavan, > > > > On Tue, Nov 25, 2025 at 02:22:05PM +0530, Pavan Kondeti wrote: > > > I am trying to understand IO fault handling in Linux w/ SMMUv3. While reading > > > the code, I understand that SVA domain creation allows taking IO pagefaults. > > > arm_smmu_enable_iopf() checks if the master support stall upon fault > > > feature or not. How do we handle page faults for PCIe devices, for which > > > transactions cannot safely be stalled? IIUC, The PRI handling in the > > > driver i.e arm_smmu_priq_thread()->arm_smmu_handle_ppr() is not doing > > > anything. In the SVA support for SMMUv3 series v7, I see the support for > > > PRI via "Add support for PRI" patch [1] but it is not merged. > > > > > > Can you please clarify if we can support SVA with PCIe devices w/o > > > pinning the memory? > > > > > > [1] > > > https://lore.kernel.org/all/20200519175502.2504091-25-jean-philippe@linaro.org/ > > > > The only SVA client we've had for SMMUv3 in the upstream kernel is the > > "uacce" thing from HiSilicon which is a platform device (rather than a > > PCIe device) and so I think the PRI support just fell by the wayside due > > to lack of an upstream user and no ability to test it. > > Right, we only support "stall" mode in the driver, not PRI right > now. PRI has a bunch of differences at the SMMU level. > > > I'm not sure whether or not Jason has plans to implement PRI but maybe > > it's something you could help with if you have hardware? > > I've been waiting for someone who has HW to take this on. > > Honestly, I'm not entirely sure what the missing gaps are, at least I > think we need to get the PRI information and package it into the fault > queue and link it back to a PRI response. Long ago we did some testing using various 'interesting' PRI supporting test setups (they weren't what you would call real devices but did let us exercise the support). IIRC the above stuff from JPB worked at the time. Given we didn't have any real endpoints, we didn't push for it to merge. No idea what status would be today though. It is on our list to come back to. Jonathan > > Jason > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-04 18:20 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-11-25 8:52 PRI support in arm-smmu-v3 driver Pavan Kondeti 2025-11-25 18:00 ` Will Deacon 2025-11-25 18:03 ` Jason Gunthorpe 2025-12-04 18:19 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).