* [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
@ 2018-10-10 14:44 Stanimir Varbanov
2018-10-10 17:08 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Stanimir Varbanov @ 2018-10-10 14:44 UTC (permalink / raw)
To: Will Deacon, Joerg Roedel
Cc: Robin Murphy, linux-arm-kernel, iommu, linux-kernel,
linux-arm-msm, Stanimir Varbanov
Call iommu client translation fault handler(s).
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
drivers/iommu/arm-smmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 066f4c8daf4e..02a8aab0cc59 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -568,6 +568,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
fsr, iova, fsynr, cfg->cbndx);
writel(fsr, cb_base + ARM_SMMU_CB_FSR);
+
+ report_iommu_fault(domain, smmu->dev, iova, 0);
+
return IRQ_HANDLED;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
2018-10-10 14:44 [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers Stanimir Varbanov
@ 2018-10-10 17:08 ` Will Deacon
2018-10-11 12:26 ` Stanimir Varbanov
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2018-10-10 17:08 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: Joerg Roedel, Robin Murphy, linux-arm-kernel, iommu,
linux-kernel, linux-arm-msm
On Wed, Oct 10, 2018 at 05:44:07PM +0300, Stanimir Varbanov wrote:
> Call iommu client translation fault handler(s).
>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
> drivers/iommu/arm-smmu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 066f4c8daf4e..02a8aab0cc59 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -568,6 +568,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
> fsr, iova, fsynr, cfg->cbndx);
>
> writel(fsr, cb_base + ARM_SMMU_CB_FSR);
> +
> + report_iommu_fault(domain, smmu->dev, iova, 0);
Who's using this? Generally, the callback here isn't so useful because it's
called in irq context. We also don't enable stalling since 3714ce1d6655.
We previously had fairly detailed discussions on the list with Rob Clark
about alternative ways to design this, but I don't remember where it ended
up.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
2018-10-10 17:08 ` Will Deacon
@ 2018-10-11 12:26 ` Stanimir Varbanov
2018-10-19 17:44 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Stanimir Varbanov @ 2018-10-11 12:26 UTC (permalink / raw)
To: Will Deacon, Stanimir Varbanov
Cc: linux-arm-msm, Joerg Roedel, linux-kernel, iommu, Robin Murphy,
linux-arm-kernel
Hi Will,
On 10/10/2018 08:08 PM, Will Deacon wrote:
> On Wed, Oct 10, 2018 at 05:44:07PM +0300, Stanimir Varbanov wrote:
>> Call iommu client translation fault handler(s).
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> drivers/iommu/arm-smmu.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
>> index 066f4c8daf4e..02a8aab0cc59 100644
>> --- a/drivers/iommu/arm-smmu.c
>> +++ b/drivers/iommu/arm-smmu.c
>> @@ -568,6 +568,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
>> fsr, iova, fsynr, cfg->cbndx);
>>
>> writel(fsr, cb_base + ARM_SMMU_CB_FSR);
>> +
>> + report_iommu_fault(domain, smmu->dev, iova, 0);
>
> Who's using this? Generally, the callback here isn't so useful because it's
The idea was to use it from video driver to dump few multimedia
interconnect registers which will give us some more info about the fault.
> called in irq context. We also don't enable stalling since 3714ce1d6655.
>
> We previously had fairly detailed discussions on the list with Rob Clark
> about alternative ways to design this, but I don't remember where it ended
> up.
It will be useful if you point me to the discussion. Thanks!
--
regards,
Stan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
2018-10-11 12:26 ` Stanimir Varbanov
@ 2018-10-19 17:44 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2018-10-19 17:44 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: linux-arm-msm, Joerg Roedel, linux-kernel, iommu, Robin Murphy,
linux-arm-kernel
On Thu, Oct 11, 2018 at 03:26:57PM +0300, Stanimir Varbanov wrote:
> On 10/10/2018 08:08 PM, Will Deacon wrote:
> > On Wed, Oct 10, 2018 at 05:44:07PM +0300, Stanimir Varbanov wrote:
> >> Call iommu client translation fault handler(s).
> >>
> >> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> >> ---
> >> drivers/iommu/arm-smmu.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> >> index 066f4c8daf4e..02a8aab0cc59 100644
> >> --- a/drivers/iommu/arm-smmu.c
> >> +++ b/drivers/iommu/arm-smmu.c
> >> @@ -568,6 +568,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
> >> fsr, iova, fsynr, cfg->cbndx);
> >>
> >> writel(fsr, cb_base + ARM_SMMU_CB_FSR);
> >> +
> >> + report_iommu_fault(domain, smmu->dev, iova, 0);
> >
> > Who's using this? Generally, the callback here isn't so useful because it's
>
> The idea was to use it from video driver to dump few multimedia
> interconnect registers which will give us some more info about the fault.
>
> > called in irq context. We also don't enable stalling since 3714ce1d6655.
> >
> > We previously had fairly detailed discussions on the list with Rob Clark
> > about alternative ways to design this, but I don't remember where it ended
> > up.
>
> It will be useful if you point me to the discussion. Thanks!
There's more, but some stuff I managed to dig up is here:
https://lists.linuxfoundation.org/pipermail/iommu/2017-January/019931.html
https://lists.linuxfoundation.org/pipermail/iommu/2017-September/024143.html
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-19 17:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 14:44 [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers Stanimir Varbanov
2018-10-10 17:08 ` Will Deacon
2018-10-11 12:26 ` Stanimir Varbanov
2018-10-19 17:44 ` Will Deacon
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).