AMD/IOMMU: replace a few PCI_BDF2()
authorJan Beulich <jbeulich@suse.com>
Wed, 13 Apr 2022 10:35:17 +0000 (12:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 13 Apr 2022 10:35:17 +0000 (12:35 +0200)
commite687e72174b73bb1d23ff79f9ef580201243d35f
treeec7664bfc272dcf655061a8a7f943e0a4cdd4696
parent7115fa562fe79c8a8733f6b821d4eea62ed56516
AMD/IOMMU: replace a few PCI_BDF2()

struct pci_dev has the wanted value directly available; use it. Note
that this fixes a - imo benign - mistake in reassign_device(): The unity
map removal ought to be based on the passed in devfn (as is the case on
the establishing side). This is benign because the mappings would be
removed anyway a little later, when the "main" device gets processed.
While there also limit the scope of two variables in that function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/drivers/passthrough/amd/iommu_cmd.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/amd/pci_amd_iommu.c