diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-02-11 18:49:17 +1100 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2019-02-13 13:08:12 -0700 |
commit | a3906855890d94736d240f0f637585c1470d8d02 (patch) | |
tree | 9b652b78d7482ef03b8d5a770190157ae02d933b /drivers/vfio/pci | |
parent | 3e4835f7d7a84ab022682aaeecaae5c508aeb76c (diff) | |
download | linux-stable-a3906855890d94736d240f0f637585c1470d8d02.tar.gz linux-stable-a3906855890d94736d240f0f637585c1470d8d02.tar.bz2 linux-stable-a3906855890d94736d240f0f637585c1470d8d02.zip |
vfio/spapr_tce: Skip unsetting already unset table
VFIO TCE IOMMU v2 owns IOMMU tables. When we detach an IOMMU group from
a container, we need to unset these tables from the group which we do by
calling unset_window(). We also unset tables when removing a DMA window
via the VFIO_IOMMU_SPAPR_TCE_REMOVE ioctl.
The window removal checks if the table actually exists (hidden inside
tce_iommu_find_table()) but the group detaching does not so the user
may see duplicating messages:
pci 0009:03 : [PE# fd] Removing DMA window #0
pci 0009:03 : [PE# fd] Removing DMA window #1
pci 0009:03 : [PE# fd] Removing DMA window #0
pci 0009:03 : [PE# fd] Removing DMA window #1
At the moment this is not a problem as the second invocation
of unset_window() writes zeroes to the HW registers again and exits early
as there is no table.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci')
0 files changed, 0 insertions, 0 deletions