Skip to content
Commit cf5c1c87 authored by Sven Peter's avatar Sven Peter Committed by Joerg Roedel
Browse files

iommu/dart: Fix apple_dart_device_group for PCI groups



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: f0b63680 ("iommu/dart: Clear sid2group entry when a group is freed")
Signed-off-by: default avatarSven Peter <sven@svenpeter.dev>
Reviewed-by: default avatarEric Curtin <ecurtin@redhat.com>
Link: https://lore.kernel.org/r/20230128113532.94651-1-sven@svenpeter.dev


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent d8bcc870
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment