Lines Matching refs:pdev
255 struct pci_dev *pdev; in addr_to_dma_page_maddr() local
271 pdev = pci_get_pdev_by_domain(domain, -1, -1, -1); in addr_to_dma_page_maddr()
272 drhd = acpi_find_matched_drhd_unit(pdev); in addr_to_dma_page_maddr()
289 pdev = pci_get_pdev_by_domain(domain, -1, -1, -1); in addr_to_dma_page_maddr()
290 drhd = acpi_find_matched_drhd_unit(pdev); in addr_to_dma_page_maddr()
1326 u8 bus, u8 devfn, const struct pci_dev *pdev) in domain_context_mapping_one() argument
1347 if ( pdev ) in domain_context_mapping_one()
1349 if ( pdev->domain != domain ) in domain_context_mapping_one()
1355 pdev->domain ? pdev->domain->domain_id : -1); in domain_context_mapping_one()
1477 struct pci_dev *pdev) in domain_context_mapping() argument
1481 u8 seg = pdev->seg, bus = pdev->bus, secbus; in domain_context_mapping()
1483 drhd = acpi_find_matched_drhd_unit(pdev); in domain_context_mapping()
1489 switch ( pdev->type ) in domain_context_mapping()
1511 pdev); in domain_context_mapping()
1512 if ( !ret && devfn == pdev->devfn && ats_device(pdev, drhd) > 0 ) in domain_context_mapping()
1513 enable_ats_device(pdev, &drhd->iommu->ats_devices); in domain_context_mapping()
1524 pdev); in domain_context_mapping()
1540 (secbus != pdev->bus || pdev->devfn != 0) ) in domain_context_mapping()
1548 domain->domain_id, pdev->type, in domain_context_mapping()
1554 if ( !ret && devfn == pdev->devfn ) in domain_context_mapping()
1555 pci_vtd_quirk(pdev); in domain_context_mapping()
1627 struct pci_dev *pdev) in domain_context_unmap() argument
1632 u8 seg = pdev->seg, bus = pdev->bus, tmp_bus, tmp_devfn, secbus; in domain_context_unmap()
1635 drhd = acpi_find_matched_drhd_unit(pdev); in domain_context_unmap()
1640 switch ( pdev->type ) in domain_context_unmap()
1662 if ( !ret && devfn == pdev->devfn && ats_device(pdev, drhd) > 0 ) in domain_context_unmap()
1663 disable_ats_device(pdev); in domain_context_unmap()
1696 domain->domain_id, pdev->type, in domain_context_unmap()
1706 for_each_pdev ( domain, pdev ) in domain_context_unmap()
1708 if ( pdev->seg == seg && pdev->bus == bus && pdev->devfn == devfn ) in domain_context_unmap()
1711 drhd = acpi_find_matched_drhd_unit(pdev); in domain_context_unmap()
1969 static int intel_iommu_add_device(u8 devfn, struct pci_dev *pdev) in intel_iommu_add_device() argument
1977 if ( !pdev->domain ) in intel_iommu_add_device()
1980 ret = domain_context_mapping(pdev->domain, devfn, pdev); in intel_iommu_add_device()
1984 pdev->domain->domain_id); in intel_iommu_add_device()
1990 if ( rmrr->segment == pdev->seg && in intel_iommu_add_device()
1991 PCI_BUS(bdf) == pdev->bus && in intel_iommu_add_device()
2000 ret = rmrr_identity_mapping(pdev->domain, 1, rmrr, 0); in intel_iommu_add_device()
2003 pdev->domain->domain_id); in intel_iommu_add_device()
2010 static int intel_iommu_enable_device(struct pci_dev *pdev) in intel_iommu_enable_device() argument
2012 struct acpi_drhd_unit *drhd = acpi_find_matched_drhd_unit(pdev); in intel_iommu_enable_device()
2013 int ret = drhd ? ats_device(pdev, drhd) : -ENODEV; in intel_iommu_enable_device()
2015 pci_vtd_quirk(pdev); in intel_iommu_enable_device()
2020 ret = enable_ats_device(pdev, &drhd->iommu->ats_devices); in intel_iommu_enable_device()
2025 static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev) in intel_iommu_remove_device() argument
2031 if ( !pdev->domain ) in intel_iommu_remove_device()
2036 if ( rmrr->segment != pdev->seg || in intel_iommu_remove_device()
2037 PCI_BUS(bdf) != pdev->bus || in intel_iommu_remove_device()
2045 rmrr_identity_mapping(pdev->domain, 0, rmrr, 0); in intel_iommu_remove_device()
2048 return domain_context_unmap(pdev->domain, devfn, pdev); in intel_iommu_remove_device()
2051 static int __hwdom_init setup_hwdom_device(u8 devfn, struct pci_dev *pdev) in setup_hwdom_device() argument
2053 return domain_context_mapping(pdev->domain, devfn, pdev); in setup_hwdom_device()
2337 u8 devfn, struct pci_dev *pdev) in reassign_device_ownership() argument
2361 if ( rmrr->segment == pdev->seg && in reassign_device_ownership()
2362 PCI_BUS(bdf) == pdev->bus && in reassign_device_ownership()
2375 ret = domain_context_unmap(source, devfn, pdev); in reassign_device_ownership()
2382 ret = domain_context_mapping(target, devfn, pdev); in reassign_device_ownership()
2391 if ( devfn == pdev->devfn ) in reassign_device_ownership()
2393 list_move(&pdev->domain_list, &target->arch.pdev_list); in reassign_device_ownership()
2394 pdev->domain = target; in reassign_device_ownership()
2404 struct domain *d, u8 devfn, struct pci_dev *pdev, u32 flag) in intel_iommu_assign_device() argument
2414 seg = pdev->seg; in intel_iommu_assign_device()
2415 bus = pdev->bus; in intel_iommu_assign_device()
2448 ret = reassign_device_ownership(hardware_domain, d, devfn, pdev); in intel_iommu_assign_device()
2462 reassign_device_ownership(d, hardware_domain, devfn, pdev); in intel_iommu_assign_device()