Home
last modified time | relevance | path

Searched refs:pdev (Results 1 – 25 of 36) sorted by relevance

12

/xen/xen/drivers/vpci/
A Dmsi.c80 pci_conf_write16(pdev->sbdf, reg, control_read(pdev, reg, data)); in control_write()
110 update_msi(pdev, msi); in address_write()
131 update_msi(pdev, msi); in address_hi_write()
150 update_msi(pdev, msi); in data_write()
188 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in init_msi()
189 unsigned int pos = pci_find_cap_offset(pdev->seg, pdev->bus, slot, func, in init_msi()
286 if ( !pdev->vpci || !spin_trylock(&pdev->vpci->lock) ) in vpci_dump_msi()
292 printk("%04x:%02x:%02x.%u MSI\n", pdev->seg, pdev->bus, in vpci_dump_msi()
293 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in vpci_dump_msi()
310 printk("%04x:%02x:%02x.%u MSI-X\n", pdev->seg, pdev->bus, in vpci_dump_msi()
[all …]
A Dmsix.c45 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in update_entry()
53 pdev->seg, pdev->bus, slot, func, nr, rc); in update_entry()
64 pdev->seg, pdev->bus, slot, func, nr, rc); in update_entry()
75 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in control_write()
138 pdev->seg, pdev->bus, slot, func, i, rc); in control_write()
184 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in access_allowed()
354 const struct pci_dev *pdev = msix->pdev; in msix_write() local
436 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), in vpci_make_msix_hole()
450 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in init_msix()
455 msix_offset = pci_find_cap_offset(pdev->seg, pdev->bus, slot, func, in init_msix()
[all …]
A Dheader.c145 modify_decoding(v->vpci.pdev, in vpci_process_pending()
192 curr->vpci.pdev = pdev; in defer_map()
268 for_each_pdev ( pdev->domain, tmp ) in modify_bars()
270 if ( tmp == pdev ) in modify_bars()
325 return apply_map(pdev->domain, pdev, mem, cmd); in modify_bars()
349 modify_bars(pdev, cmd, false); in cmd_write()
358 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in bar_write()
376 pdev->seg, pdev->bus, slot, func, in bar_write()
405 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in rom_write()
413 pdev->seg, pdev->bus, slot, func); in rom_write()
[all …]
A Dvpci.c40 spin_lock(&pdev->vpci->lock); in vpci_remove_device()
51 xfree(pdev->vpci->msix); in vpci_remove_device()
52 xfree(pdev->vpci->msi); in vpci_remove_device()
53 xfree(pdev->vpci); in vpci_remove_device()
54 pdev->vpci = NULL; in vpci_remove_device()
62 if ( !has_vpci(pdev->domain) ) in vpci_add_handlers()
66 if ( !pdev->vpci ) in vpci_add_handlers()
80 vpci_remove_device(pdev); in vpci_add_handlers()
308 const struct pci_dev *pdev; in vpci_read() local
321 if ( !pdev ) in vpci_read()
[all …]
/xen/xen/drivers/passthrough/
A Dpci.c331 if ( pdev->bus == bus && pdev->devfn == devfn ) in alloc_pdev()
335 if ( !pdev ) in alloc_pdev()
568 if ( pdev && stride != pdev->phantom_stride ) in pci_get_real_pdev()
746 if ( !pdev->info.is_virtfn && !pdev->vf_rlen[0] ) in pci_add_device()
844 if ( pdev->bus == bus && pdev->devfn == devfn ) in pci_remove_device()
1346 struct aer_hest_parse_info info = { .pdev = pdev }; in pcie_aer_get_firmware_first()
1348 return pci_find_cap_offset(pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), in pcie_aer_get_firmware_first()
1366 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), pdev->domain, in _dump_pci_devices()
1465 for ( devfn = pdev->devfn ; pdev->phantom_stride; ) in iommu_remove_device()
1527 ASSERT(pdev && (pdev->domain == hardware_domain || in assign_device()
[all …]
A Dats.h27 int enable_ats_device(struct pci_dev *pdev, struct list_head *ats_list);
28 void disable_ats_device(struct pci_dev *pdev);
/xen/xen/drivers/passthrough/x86/
A Dats.c27 u16 seg = pdev->seg; in enable_ats_device()
28 u8 bus = pdev->bus, devfn = pdev->devfn; in enable_ats_device()
44 if ( other == pdev ) in enable_ats_device()
59 pdev->ats.cap_pos = pos; in enable_ats_device()
63 list_add(&pdev->ats.list, ats_list); in enable_ats_device()
77 u16 seg = pdev->seg; in disable_ats_device()
78 u8 bus = pdev->bus, devfn = pdev->devfn; in disable_ats_device()
80 BUG_ON(!pdev->ats.cap_pos); in disable_ats_device()
82 value = pci_conf_read16(pdev->sbdf, pdev->ats.cap_pos + ATS_REG_CTL); in disable_ats_device()
84 pci_conf_write16(pdev->sbdf, pdev->ats.cap_pos + ATS_REG_CTL, value); in disable_ats_device()
[all …]
/xen/xen/drivers/passthrough/amd/
A Dpci_amd_iommu.c92 u8 bus = pdev->bus; in amd_iommu_setup_domain_device()
331 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in reassign_device()
356 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
380 return reassign_device(pdev->domain, d, devfn, pdev); in amd_iommu_assign_device()
452 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in amd_iommu_add_device()
466 pdev->seg, pdev->bus, PCI_SLOT(devfn), in amd_iommu_add_device()
489 if ( pdev->msix || pdev->msi_maxvec ) in amd_iommu_add_device()
494 pdev->msix ? pdev->msix->nr_entries in amd_iommu_add_device()
511 amd_iommu_setup_domain_device(pdev->domain, iommu, devfn, pdev); in amd_iommu_add_device()
524 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in amd_iommu_remove_device()
[all …]
A Diommu_cmd.c285 if ( !pci_ats_enabled(pdev->seg, pdev->bus, pdev->devfn) ) in amd_iommu_flush_iotlb()
288 iommu = find_iommu_for_device(pdev->seg, PCI_BDF2(pdev->bus, pdev->devfn)); in amd_iommu_flush_iotlb()
293 __func__, pdev->seg, pdev->bus, in amd_iommu_flush_iotlb()
294 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in amd_iommu_flush_iotlb()
303 maxpend = pdev->ats.queue_depth & 0xff; in amd_iommu_flush_iotlb()
315 struct pci_dev *pdev; in amd_iommu_flush_all_iotlbs() local
320 for_each_pdev( d, pdev ) in amd_iommu_flush_all_iotlbs()
322 u8 devfn = pdev->devfn; in amd_iommu_flush_all_iotlbs()
325 amd_iommu_flush_iotlb(devfn, pdev, daddr, order); in amd_iommu_flush_all_iotlbs()
326 devfn += pdev->phantom_stride; in amd_iommu_flush_all_iotlbs()
[all …]
A Diommu_intr.c621 struct pci_dev *pdev = msi_desc->dev; in amd_iommu_msi_msg_update_ire() local
627 bdf = pdev ? PCI_BDF2(pdev->bus, pdev->devfn) : hpet_sbdf.bdf; in amd_iommu_msi_msg_update_ire()
628 seg = pdev ? pdev->seg : hpet_sbdf.seg; in amd_iommu_msi_msg_update_ire()
667 const struct pci_dev *pdev = msi_desc->dev; in amd_iommu_read_msi_from_ire() local
668 u16 bdf = pdev ? PCI_BDF2(pdev->bus, pdev->devfn) : hpet_sbdf.bdf; in amd_iommu_read_msi_from_ire()
669 u16 seg = pdev ? pdev->seg : hpet_sbdf.seg; in amd_iommu_read_msi_from_ire()
/xen/xen/drivers/passthrough/vtd/x86/
A Dats.c56 if ( !acpi_find_matched_atsr_unit(pdev) ) in ats_device()
60 pos = pci_find_ext_capability(pdev->seg, pdev->bus, pdev->devfn, in ats_device()
75 const struct pci_dev *pdev, uint16_t did) in device_in_domain() argument
89 if ( !root_present(root_entry[pdev->bus]) ) in device_in_domain()
92 ctxt_entry = map_vtd_domain_page(root_entry[pdev->bus].val); in device_in_domain()
93 if ( context_domain_id(ctxt_entry[pdev->devfn]) != did ) in device_in_domain()
96 tt = context_translation_type(ctxt_entry[pdev->devfn]); in device_in_domain()
114 struct pci_dev *pdev, *temp; in dev_invalidate_iotlb() local
128 if ( !device_in_domain(iommu, pdev, did) ) in dev_invalidate_iotlb()
135 rc = qinval_device_iotlb_sync(iommu, pdev, did, sbit, addr); in dev_invalidate_iotlb()
[all …]
/xen/xen/arch/x86/hvm/
A Dvmsi.c155 struct pci_dev *pdev; member
438 entry->pdev = pdev; in add_msixtbl_entry()
463 struct pci_dev *pdev; in msixtbl_pt_register() local
492 pdev = msi_desc->dev; in msixtbl_pt_register()
495 if ( pdev == entry->pdev ) in msixtbl_pt_register()
534 struct pci_dev *pdev; in msixtbl_pt_unregister() local
554 if ( pdev == entry->pdev ) in msixtbl_pt_unregister()
702 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), in vpci_msi_update()
758 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), in vpci_msi_enable()
905 struct pci_dev *pdev = msix->pdev; in vpci_msix_arch_print() local
[all …]
A Dirq.c260 unsigned int gsi, pdev, pintx, asserted; in hvm_set_callback_irq_level() local
290 pdev = hvm_irq->callback_via.pci.dev; in hvm_set_callback_irq_level()
293 __hvm_pci_intx_assert(d, pdev, pintx); in hvm_set_callback_irq_level()
295 __hvm_pci_intx_deassert(d, pdev, pintx); in hvm_set_callback_irq_level()
430 unsigned int gsi=0, pdev=0, pintx=0; in hvm_set_callback_via() local
456 pdev = hvm_irq->callback_via.pci.dev; in hvm_set_callback_via()
484 __hvm_pci_intx_assert(d, pdev, pintx); in hvm_set_callback_via()
664 unsigned int asserted, pdev, pintx; in irq_save_pci() local
669 pdev = hvm_irq->callback_via.pci.dev; in irq_save_pci()
680 __hvm_pci_intx_deassert(d, pdev, pintx); in irq_save_pci()
[all …]
/xen/xen/include/xen/
A Dvpci.h10 typedef uint32_t vpci_read_t(const struct pci_dev *pdev, unsigned int reg,
13 typedef void vpci_write_t(const struct pci_dev *pdev, unsigned int reg,
30 void vpci_remove_device(struct pci_dev *pdev);
47 uint32_t vpci_hw_read16(const struct pci_dev *pdev, unsigned int reg,
49 uint32_t vpci_hw_read32(const struct pci_dev *pdev, unsigned int reg,
116 struct pci_dev *pdev; member
145 struct pci_dev *pdev; member
154 int vpci_make_msix_hole(const struct pci_dev *pdev);
160 const struct pci_dev *pdev,
164 const struct pci_dev *pdev);
[all …]
/xen/xen/drivers/passthrough/vtd/
A Dquirks.c334 struct pci_dev *pdev; in map_me_phantom_function() local
338 pdev = pci_get_pdev(0, 0, PCI_DEVFN(dev, 0)); in map_me_phantom_function()
339 drhd = acpi_find_matched_drhd_unit(pdev); in map_me_phantom_function()
412 void pci_vtd_quirk(const struct pci_dev *pdev) in pci_vtd_quirk() argument
414 int seg = pdev->seg; in pci_vtd_quirk()
415 int bus = pdev->bus; in pci_vtd_quirk()
416 int dev = PCI_SLOT(pdev->devfn); in pci_vtd_quirk()
417 int func = PCI_FUNC(pdev->devfn); in pci_vtd_quirk()
439 val = pci_conf_read32(pdev->sbdf, 0x1AC); in pci_vtd_quirk()
498 val = pci_conf_read32(pdev->sbdf, 0x20c); in pci_vtd_quirk()
[all …]
A Diommu.c1338 if ( pdev ) in domain_context_mapping_one()
1470 u8 seg = pdev->seg, bus = pdev->bus, secbus; in domain_context_mapping()
1550 (secbus != pdev->bus || pdev->devfn != 0) ) in domain_context_mapping()
1642 u8 seg = pdev->seg, bus = pdev->bus, tmp_bus, tmp_devfn, secbus; in domain_context_unmap()
1718 if ( pdev->seg == seg && pdev->bus == bus && pdev->devfn == devfn ) in domain_context_unmap()
1994 ret = domain_context_mapping(pdev->domain, devfn, pdev); in intel_iommu_add_device()
2062 return domain_context_unmap(pdev->domain, devfn, pdev); in intel_iommu_remove_device()
2067 return domain_context_mapping(pdev->domain, devfn, pdev); in setup_hwdom_device()
2400 if ( devfn == pdev->devfn && pdev->domain != dom_io ) in reassign_device_ownership()
2421 if ( devfn == pdev->devfn && pdev->domain != target ) in reassign_device_ownership()
[all …]
A Dintremap.c480 if ( !pdev || !ire ) in set_msi_source_id()
483 seg = pdev->seg; in set_msi_source_id()
484 bus = pdev->bus; in set_msi_source_id()
485 devfn = pdev->devfn; in set_msi_source_id()
486 switch ( pdev->type ) in set_msi_source_id()
494 switch ( pdev->phantom_stride ) in set_msi_source_id()
532 pdev->domain->domain_id, pdev->type, in set_msi_source_id()
676 if ( pdev ) in msi_msg_to_remap_entry()
710 struct pci_dev *pdev = msi_desc->dev; in msi_msg_read_remap_rte() local
713 drhd = pdev ? acpi_find_matched_drhd_unit(pdev) in msi_msg_read_remap_rte()
[all …]
A Dqinval.c211 struct pci_dev *pdev, u16 did) in dev_invalidate_sync() argument
231 iommu_dev_iotlb_flush_timeout(d, pdev); in dev_invalidate_sync()
238 int qinval_device_iotlb_sync(struct vtd_iommu *iommu, struct pci_dev *pdev, in qinval_device_iotlb_sync() argument
246 ASSERT(pdev); in qinval_device_iotlb_sync()
256 qinval_entry->q.dev_iotlb_inv_dsc.lo.max_invs_pend = pdev->ats.queue_depth; in qinval_device_iotlb_sync()
258 qinval_entry->q.dev_iotlb_inv_dsc.lo.sid = PCI_BDF2(pdev->bus, pdev->devfn); in qinval_device_iotlb_sync()
269 return dev_invalidate_sync(iommu, pdev, did); in qinval_device_iotlb_sync()
A Ddmar.c200 if ( pdev == NULL ) in acpi_find_matched_drhd_unit()
203 if ( pdev->info.is_virtfn ) in acpi_find_matched_drhd_unit()
205 bus = pdev->info.physfn.bus; in acpi_find_matched_drhd_unit()
206 devfn = !pdev->info.is_extfn ? pdev->info.physfn.devfn : 0; in acpi_find_matched_drhd_unit()
208 else if ( pdev->info.is_extfn ) in acpi_find_matched_drhd_unit()
210 bus = pdev->bus; in acpi_find_matched_drhd_unit()
215 bus = pdev->bus; in acpi_find_matched_drhd_unit()
216 devfn = pdev->devfn; in acpi_find_matched_drhd_unit()
221 if ( drhd->segment != pdev->seg ) in acpi_find_matched_drhd_unit()
244 if ( atsr->segment != pdev->seg ) in acpi_find_matched_atsr_unit()
[all …]
/xen/xen/arch/x86/
A Dmsi.c330 pdev = entry->dev; in msi_set_mask_bit()
331 seg = pdev->seg; in msi_set_mask_bit()
332 bus = pdev->bus; in msi_set_mask_bit()
1007 if ( !pdev ) in __pci_enable_msi()
1067 if ( !pdev || !pdev->msix ) in __pci_enable_msix()
1160 if ( !pdev ) in pci_prepare_msix()
1223 unsigned int pos = pci_find_cap_offset(pdev->seg, pdev->bus, pdev->sbdf.dev, in pci_reset_msix_state()
1253 if ( pdev->msix ) in pci_msi_conf_write_intercept()
1315 u8 slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in pci_restore_msi_state()
1325 (pdev->seg << 16) | (pdev->bus << 8) | in pci_restore_msi_state()
[all …]
A Dpci.c76 struct pci_dev *pdev; in pci_conf_write_intercept() local
93 pdev = pci_get_pdev(seg, PCI_BUS(bdf), PCI_DEVFN2(bdf)); in pci_conf_write_intercept()
94 if ( pdev ) in pci_conf_write_intercept()
95 rc = pci_msi_conf_write_intercept(pdev, reg, size, data); in pci_conf_write_intercept()
A Dphysdev.c575 struct pci_dev *pdev; in do_physdev_op() local
582 pdev = pci_get_pdev(0, restore_msi.bus, restore_msi.devfn); in do_physdev_op()
583 ret = pdev ? pci_restore_msi_state(pdev) : -ENODEV; in do_physdev_op()
590 struct pci_dev *pdev; in do_physdev_op() local
597 pdev = pci_get_pdev(dev.seg, dev.bus, dev.devfn); in do_physdev_op()
598 ret = pdev ? pci_restore_msi_state(pdev) : -ENODEV; in do_physdev_op()
/xen/tools/tests/vpci/
A Dmain.c37 static uint32_t vpci_read8(const struct pci_dev *pdev, unsigned int reg, in vpci_read8() argument
43 static void vpci_write8(const struct pci_dev *pdev, unsigned int reg, in vpci_write8() argument
49 static uint32_t vpci_read16(const struct pci_dev *pdev, unsigned int reg, in vpci_read16() argument
55 static void vpci_write16(const struct pci_dev *pdev, unsigned int reg, in vpci_write16() argument
61 static uint32_t vpci_read32(const struct pci_dev *pdev, unsigned int reg, in vpci_read32() argument
67 static void vpci_write32(const struct pci_dev *pdev, unsigned int reg, in vpci_write32() argument
/xen/xen/drivers/video/
A Dvga.c117 const struct pci_dev *pdev; in video_endboot() local
121 pdev = pci_get_pdev(0, bus, devfn); in video_endboot()
124 if ( !pdev || in video_endboot()
/xen/xen/drivers/pci/
A Dpci.c117 void pci_intx(const struct pci_dev *pdev, bool enable) in pci_intx() argument
119 uint16_t cmd = pci_conf_read16(pdev->sbdf, PCI_COMMAND); in pci_intx()
125 pci_conf_write16(pdev->sbdf, PCI_COMMAND, cmd); in pci_intx()

Completed in 46 milliseconds

12