[PATCH] iommu/dart: Fix apple_dart_device_group for PCI groups
Joerg Roedel
joro at 8bytes.org
Fri Feb 3 01:56:22 PST 2023
On Sat, Jan 28, 2023 at 12:35:32PM +0100, Sven Peter wrote:
> pci_device_group() can return an already existing IOMMU group if the PCI
> device's pagetables have to be shared with another one due to bus
> toplogy, isolation features and/or DMA alias quirks.
> apple_dart_device_group() however assumes that the group has just been
> created and overwrites its iommudata which will eventually lead to
> apple_dart_release_group leaving stale entries in sid2group.
> Fix that by merging the iommudata if the returned group already exists.
>
> Fixes: f0b636804c7c ("iommu/dart: Clear sid2group entry when a group is freed")
> Signed-off-by: Sven Peter <sven at svenpeter.dev>
> ---
> drivers/iommu/apple-dart.c | 51 ++++++++++++++++++++++++++++++++------
> 1 file changed, 44 insertions(+), 7 deletions(-)
Applied, thanks.
More information about the linux-arm-kernel
mailing list