Lines Matching refs:devfn

112     u8 devfn, struct pci_dev *pdev)  in amd_iommu_setup_domain_device()  argument
131 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(bus, devfn)); in amd_iommu_setup_domain_device()
143 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_setup_domain_device()
161 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_setup_domain_device()
162 !pci_ats_enabled(iommu->seg, bus, pdev->devfn) ) in amd_iommu_setup_domain_device()
164 if ( devfn == pdev->devfn ) in amd_iommu_setup_domain_device()
167 amd_iommu_flush_iotlb(devfn, pdev, INV_IOMMU_ALL_PAGES_ADDRESS, 0); in amd_iommu_setup_domain_device()
249 static int amd_iommu_add_device(u8 devfn, struct pci_dev *pdev);
301 u8 devfn, struct pci_dev *pdev) in amd_iommu_disable_domain_device() argument
309 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(bus, devfn)); in amd_iommu_disable_domain_device()
317 if ( pci_ats_device(iommu->seg, bus, pdev->devfn) && in amd_iommu_disable_domain_device()
332 if ( devfn == pdev->devfn && in amd_iommu_disable_domain_device()
333 pci_ats_device(iommu->seg, bus, devfn) && in amd_iommu_disable_domain_device()
334 pci_ats_enabled(iommu->seg, bus, devfn) ) in amd_iommu_disable_domain_device()
339 u8 devfn, struct pci_dev *pdev) in reassign_device() argument
345 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in reassign_device()
351 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
356 amd_iommu_disable_domain_device(source, iommu, devfn, pdev); in reassign_device()
358 if ( devfn == pdev->devfn ) in reassign_device()
368 amd_iommu_setup_domain_device(target, iommu, devfn, pdev); in reassign_device()
370 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
376 static int amd_iommu_assign_device(struct domain *d, u8 devfn, in amd_iommu_assign_device() argument
381 int bdf = PCI_BDF2(pdev->bus, devfn); in amd_iommu_assign_device()
394 return reassign_device(hardware_domain, d, devfn, pdev); in amd_iommu_assign_device()
464 static int amd_iommu_add_device(u8 devfn, struct pci_dev *pdev) in amd_iommu_add_device() argument
472 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in amd_iommu_add_device()
481 pdev->seg, pdev->bus, PCI_SLOT(devfn), in amd_iommu_add_device()
482 PCI_FUNC(devfn)); in amd_iommu_add_device()
487 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_add_device()
492 amd_iommu_setup_domain_device(pdev->domain, iommu, devfn, pdev); in amd_iommu_add_device()
496 static int amd_iommu_remove_device(u8 devfn, struct pci_dev *pdev) in amd_iommu_remove_device() argument
503 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in amd_iommu_remove_device()
509 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_remove_device()
514 amd_iommu_disable_domain_device(pdev->domain, iommu, devfn, pdev); in amd_iommu_remove_device()
518 static int amd_iommu_group_id(u16 seg, u8 bus, u8 devfn) in amd_iommu_group_id() argument
520 int bdf = PCI_BDF2(bus, devfn); in amd_iommu_group_id()