Re: [PATCH v2 39/40] iommu/arm-smmu-v3: Add support for PRI

Jean-Philippe Brucker
2018-05-29T10:27:33Z

On 25/05/18 15:08, Bharat Kumar Gogada wrote:
>> + master->can_fault = true;
>> + master->ste.prg_resp_needs_ssid =
>> pci_prg_resp_requires_prefix(pdev);
>
> Any reason why this is not cleared in arm_smmu_disable_pri ?

Actually, setting it here is wrong. Since we now call enable_pri()
lazily, prg_resp_needs_ssid isn't initialized when writing the STE. That
bit is read by the SMMU when the PRIQ is full and it needs to
auto-respond. Fortunately the PRI doesn't need to be enabled in order to
read this bit, so we can move pci_prg_resp_requires_prefix() to
add_device() and clear the bit in remove_device(). Thanks for catching this.

Jean