[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fstyudx5.wl-maz@kernel.org>
Date: Tue, 21 Sep 2021 16:49:26 +0100
From: Marc Zyngier <maz@...nel.org>
To: Sven Peter <sven@...npeter.dev>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/dart: Remove iommu_flush_ops
On Tue, 21 Sep 2021 16:39:34 +0100,
Sven Peter <sven@...npeter.dev> wrote:
>
> apple_dart_tlb_flush_{all,walk} expect to get a struct apple_dart_domain
> but instead get a struct iommu_domain right now. This breaks those two
> functions and can lead to kernel panics like the one below.
> DART can only invalidate the entire TLB and apple_dart_iotlb_sync will
> already flush everything. There's no need to do that again inside those
> two functions. Let's just drop them.
>
> pci 0000:03:00.0: Removing from iommu group 1
> Unable to handle kernel paging request at virtual address 0000000100000023
> [...]
> Call trace:
> _raw_spin_lock_irqsave+0x54/0xbc
> apple_dart_hw_stream_command.constprop.0+0x2c/0x130
> apple_dart_tlb_flush_all+0x48/0x90
> free_io_pgtable_ops+0x40/0x70
> apple_dart_domain_free+0x2c/0x44
> iommu_group_release+0x68/0xac
> kobject_cleanup+0x4c/0x1fc
> kobject_cleanup+0x14c/0x1fc
> kobject_put+0x64/0x84
> iommu_group_remove_device+0x110/0x180
> iommu_release_device+0x50/0xa0
> [...]
>
> Fixes: 46d1fb072e76b161 ("iommu/dart: Add DART iommu driver")
> Reported-by: Marc Zyngier <maz@...nel.org>
> Signed-off-by: Sven Peter <sven@...npeter.dev>
Thanks for addressing this so quickly.
Acked-by: Marc Zyngier <maz@...nel.org>
Tested-by: Marc Zyngier <maz@...nel.org>
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists