AMD/IOMMU: pull ATS disabling earlier
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 10:47:18 +0000 (12:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 10:47:18 +0000 (12:47 +0200)
commit388b5f1be68861b8abaf67e6a311b09b5a0816c5
treedf2a02d66af4cb9126396eab0830e7b78aa9c402
parent246a0cd415af377d26576dd9962ee78c0f83f1f9
AMD/IOMMU: pull ATS disabling earlier

Disabling should be done in the opposite order of enabling: ATS wants to
be turned off before adjusting the DTE, just like it gets enabled only
after the DTE was suitably prepared. Note that we want ATS to be
disabled as soon as any of the DTEs involved in the handling of a device
(including phantom devices) gets adjusted respectively. For this reason
the "devfn == pdev->devfn" of the original conditional gets dropped.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/drivers/passthrough/amd/pci_amd_iommu.c