Re: [PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Russell King - ARM Linux admin
On Fri, Sep 13, 2019 at 12:48:37PM +0100, Robin Murphy wrote: > Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool > for smoking out inadequate firmware, the failure mode is non-obvious > and can be confusing for end users. Add some special-case reporting of > Unidentified Stream

Re: [PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Doug Anderson
Hi, On Fri, Sep 13, 2019 at 4:48 AM Robin Murphy wrote: > > Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool > for smoking out inadequate firmware, the failure mode is non-obvious > and can be confusing for end users. Add some special-case reporting of > Unidentified Stream

Re: [PATCH v1 2/2] of: Let of_for_each_phandle fallback to non-negative cell_count

2019-09-13 Thread Rob Herring
On Sat, 24 Aug 2019 15:28:46 +0200, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= wrote: > Referencing device tree nodes from a property allows to pass arguments. > This is for example used for referencing gpios. This looks as follows: > > gpio_ctrl: gpio-controller { >

Re: iommu/amd: Flushing and locking fixes

2019-09-13 Thread Sironi, Filippo
> On 11. Sep 2019, at 13:34, Joerg Roedel wrote: > > Hi Filippo, > > On Tue, Sep 10, 2019 at 07:49:20PM +0200, Filippo Sironi wrote: >> This patch series introduce patches to take the domain lock whenever we call >> functions that end up calling __domain_flush_pages. Holding the domain lock

[PATCH 3/4] iommu/amd: Introduce first_pte_l7() helper

2019-09-13 Thread Andrei Dulea via iommu
Given an arbitrary pte that is part of a large mapping, this function returns the first pte of the series (and optionally the mapped size and number of PTEs) It will be re-used in a subsequent patch to replace an existing L7 mapping. Signed-off-by: Andrei Dulea --- drivers/iommu/amd_iommu.c |

[PATCH 2/4] iommu/amd: Fix downgrading default page-sizes in alloc_pte()

2019-09-13 Thread Andrei Dulea via iommu
Downgrading an existing large mapping to a mapping using smaller page-sizes works only for the mappings created with page-mode 7 (i.e. non-default page size). Treat large mappings created with page-mode 0 (i.e. default page size) like a non-present mapping and allow to overwrite it in

[PATCH 4/4] iommu/amd: Unmap all L7 PTEs when downgrading page-sizes

2019-09-13 Thread Andrei Dulea via iommu
When replacing a large mapping created with page-mode 7 (i.e. non-default page size), tear down the entire series of replicated PTEs. Besides providing access to the old mapping, another thing that might go wrong with this issue is on the fetch_pte() code path that can return a PDE entry of the

[PATCH 1/4] iommu/amd: Fix pages leak in free_pagetable()

2019-09-13 Thread Andrei Dulea via iommu
Take into account the gathered freelist in free_sub_pt(), otherwise we end up leaking all that pages. Fixes: 409afa44f9ba ("iommu/amd: Introduce free_sub_pt() function") Signed-off-by: Andrei Dulea --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 0/4] iommu/amd: re-mapping fixes

2019-09-13 Thread Andrei Dulea via iommu
This patch series tries to address a few issues encountered when replacing existing mappings: .> pages leak in free_pagetable() .> allow downgrading default page-sizes in alloc_pte() .> tear-down all the replicated PTEs of a large mapping when downgrading to smaller mappings Andrei Dulea (4):

Re: [PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Robin Murphy
On 13/09/2019 15:35, Qian Cai wrote: On Fri, 2019-09-13 at 12:48 +0100, Robin Murphy wrote: Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool for smoking out inadequate firmware, the failure mode is non-obvious and can be confusing for end users. Add some special-case

Re: [PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Qian Cai
On Fri, 2019-09-13 at 12:48 +0100, Robin Murphy wrote: > Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool > for smoking out inadequate firmware, the failure mode is non-obvious > and can be confusing for end users. Add some special-case reporting of > Unidentified Stream Faults

Re: [PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Robin Murphy
On 13/09/2019 12:48, Robin Murphy wrote: Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool for smoking out inadequate firmware, the failure mode is non-obvious and can be confusing for end users. Add some special-case reporting of Unidentified Stream Faults to help clarify

[PATCH] iommu/arm-smmu: Report USF more clearly

2019-09-13 Thread Robin Murphy
Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool for smoking out inadequate firmware, the failure mode is non-obvious and can be confusing for end users. Add some special-case reporting of Unidentified Stream Faults to help clarify this particular symptom. CC: Douglas Anderson

Re: [PATCH v1 1/2] iommu: pass cell_count = -1 to of_for_each_phandle with cells_name

2019-09-13 Thread Joerg Roedel
On Thu, Sep 12, 2019 at 09:43:53AM +0200, Uwe Kleine-König wrote: > On Tue, Sep 03, 2019 at 02:52:10PM +0200, Joerg Roedel wrote: > > Acked-by: Joerg Roedel > > Does this ack mean that Rob is expected to apply this together with > patch 2? "Expected" is a strong word. I'd more phrase it like I

Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file

2019-09-13 Thread Guo Ren
Another idea is seperate remote TLB invalidate into two instructions: - sfence.vma.b.asyc - sfence.vma.b.barrier // wait all async TLB invalidate operations finished for all harts. (I remember who mentioned me separate them into two instructions after session. Anup? Is the idea right ?)