Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-26 Thread Zhou Wang
On 2021/2/27 0:29, Jean-Philippe Brucker wrote: > Hi Zhou, > > On Fri, Feb 26, 2021 at 05:43:27PM +0800, Zhou Wang wrote: >> On 2021/2/1 19:14, Jean-Philippe Brucker wrote: >>> Hi Zhou, >>> >>> On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > @@ -1033,8 +1076,7 @@ int arm_smmu_writ

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-26 Thread Jean-Philippe Brucker
Hi Zhou, On Fri, Feb 26, 2021 at 05:43:27PM +0800, Zhou Wang wrote: > On 2021/2/1 19:14, Jean-Philippe Brucker wrote: > > Hi Zhou, > > > > On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > >>> @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain > >>> *smmu_domain,

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-26 Thread Zhou Wang
On 2021/2/1 19:14, Jean-Philippe Brucker wrote: > Hi Zhou, > > On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: >>> @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain >>> *smmu_domain, int ssid, >>> FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | >>>

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-01 Thread Jean-Philippe Brucker
On Mon, Feb 01, 2021 at 02:16:16PM +0100, Auger Eric wrote: > >>> + flt->type = IOMMU_FAULT_DMA_UNRECOV; > >>> + flt->event = (struct iommu_fault_unrecoverable) { > >>> + .reason = reason, > >>> + .flags = IOMMU_FAULT_UNRECOV_ADDR_VALID | > >>> +

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-01 Thread Auger Eric
Hi Jean, On 2/1/21 12:12 PM, Jean-Philippe Brucker wrote: > On Sun, Jan 31, 2021 at 07:29:09PM +0100, Auger Eric wrote: >> Hi Jean, >> >> Some rather minor comments§questions below that may not justify a respin. >> >> On 1/27/21 4:43 PM, Jean-Philippe Brucker wrote: >>> -static bool arm_smmu_iopf_

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-01 Thread Zhou Wang
On 2021/2/1 19:14, Jean-Philippe Brucker wrote: > Hi Zhou, > > On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: >>> @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain >>> *smmu_domain, int ssid, >>> FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | >>>

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-01 Thread Jean-Philippe Brucker
Hi Zhou, On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > > @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain > > *smmu_domain, int ssid, > > FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | > > CTXDESC_CD_0_V; > > > > -

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-02-01 Thread Jean-Philippe Brucker
On Sun, Jan 31, 2021 at 07:29:09PM +0100, Auger Eric wrote: > Hi Jean, > > Some rather minor comments§questions below that may not justify a respin. > > On 1/27/21 4:43 PM, Jean-Philippe Brucker wrote: > > -static bool arm_smmu_iopf_supported(struct arm_smmu_master *master) > > +bool arm_smmu_mas

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-01-31 Thread Zhou Wang
On 2021/1/27 23:43, Jean-Philippe Brucker wrote: > The SMMU provides a Stall model for handling page faults in platform > devices. It is similar to PCIe PRI, but doesn't require devices to have > their own translation cache. Instead, faulting transactions are parked > and the OS is given a chance t

Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-01-31 Thread Auger Eric
Hi Jean, Some rather minor comments§questions below that may not justify a respin. On 1/27/21 4:43 PM, Jean-Philippe Brucker wrote: > The SMMU provides a Stall model for handling page faults in platform > devices. It is similar to PCIe PRI, but doesn't require devices to have > their own translat

[PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-01-27 Thread Jean-Philippe Brucker
The SMMU provides a Stall model for handling page faults in platform devices. It is similar to PCIe PRI, but doesn't require devices to have their own translation cache. Instead, faulting transactions are parked and the OS is given a chance to fix the page tables and retry the transaction. Enable