Home
last modified time | relevance | path

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

/hypervisor/hw/
A Dpci.c308 return (pdev != NULL) ? pdev->drhd_index : INVALID_DRHD_INDEX; in pci_lookup_drhd_for_pbdf()
467 if ((pdev != NULL) && is_bridge(pdev)) { in scan_pci_hierarchy()
607 __func__, pdev->bdf.bits.b, pdev->bdf.bits.d, pdev->bdf.bits.f, cnt); in init_all_dev_config()
683 pdev->bdf.bits.b, pdev->bdf.bits.d, in pci_enable_ptm_root()
690 pdev->bdf.bits.b, pdev->bdf.bits.d, pdev->bdf.bits.f); in pci_enable_ptm_root()
731 pdev->bdf.bits.d, pdev->bdf.bits.f); in pci_enumerate_ext_cap()
743 pdev->bdf.bits.b, pdev->bdf.bits.d, pdev->bdf.bits.f); in pci_enumerate_ext_cap()
756 pdev->bdf.bits.b, pdev->bdf.bits.d, pdev->bdf.bits.f, pos); in pci_enumerate_ext_cap()
766 pdev->bdf.bits.d, pdev->bdf.bits.f); in pci_enumerate_ext_cap()
856 pdev->bdf = bdf; in pci_init_pdev()
[all …]
/hypervisor/arch/x86/configs/
A Dpci_dev.c15 static bool allocate_to_prelaunched_vm(struct pci_pdev *pdev) in allocate_to_prelaunched_vm() argument
29 bdf_is_equal(dev_config->pbdf, pdev->bdf)) { in allocate_to_prelaunched_vm()
30 dev_config->pdev = pdev; in allocate_to_prelaunched_vm()
57 bool is_allocated_to_hv = is_hv_owned_pdev(pdev->bdf); in init_one_dev_config()
65 if (is_bridge(pdev)) { in init_one_dev_config()
67 } else if (is_host_bridge(pdev)) { in init_one_dev_config()
81 && is_pci_cfg_multifunction(pdev->hdr_type) in init_one_dev_config()
82 && (pdev->bdf.bits.f == 0U)) in init_one_dev_config()
91 dev_config->vbdf.value = pdev->bdf.value; in init_one_dev_config()
92 dev_config->pbdf.value = pdev->bdf.value; in init_one_dev_config()
[all …]
/hypervisor/dm/vpci/
A Dvmsix_on_msi.c34 if ((pdev->msi_capoff != 0U) && (pdev->msix.capoff == 0U)) { in need_vmsix_on_msi_emulation()
35 msgctrl = (uint16_t)pci_pdev_read_cfg(pdev->bdf, pdev->msi_capoff + PCIR_MSI_CTRL, 2U); in need_vmsix_on_msi_emulation()
55 if (need_vmsix_on_msi_emulation(pdev, &count)) { in reserve_vmsix_on_msi_irtes()
57 intr_src.src.msi.value = pdev->bdf.value; in reserve_vmsix_on_msi_irtes()
60 pdev->irte_count = count; in reserve_vmsix_on_msi_irtes()
76 struct pci_pdev *pdev = vdev->pdev; in init_vmsix_on_msi() local
80 if (pdev->irte_count > 1U) { in init_vmsix_on_msi()
91 vdev->msix.capoff = pdev->msi_capoff; in init_vmsix_on_msi()
98 vdev->msix.table_count = pdev->irte_count; in init_vmsix_on_msi()
165 union pci_bdf pbdf = vdev->pdev->bdf; in remap_one_vmsix_entry_on_msi()
[all …]
A Dpci_pt.c324 struct pci_pdev *pdev = vdev->pdev; in vdev_bridge_pt_restore_space() local
349 struct pci_pdev *pdev = vdev->pdev; in vdev_bridge_pt_restore_bus() local
408 vdev->nr_bars = vdev->pdev->nr_bars; in init_bars()
411 pbdf.value = vdev->pdev->bdf.value; in init_bars()
524 struct pci_pdev *pdev = vdev->pdev; in init_vmsix_pt() local
526 vdev->msix.capoff = pdev->msix.capoff; in init_vmsix_pt()
533 (void)memcpy_s((void *)&vdev->cfgdata.data_8[pdev->msix.capoff], pdev->msix.caplen, in init_vmsix_pt()
534 (void *)&pdev->msix.cap[0U], pdev->msix.caplen); in init_vmsix_pt()
559 hdr = pci_pdev_read_cfg(vdev->pdev->bdf, vdev->pdev->sriov.capoff, 4U); in vdev_pt_hide_sriov_cap()
564 vdev->pdev->sriov.hide_sriov = true; in vdev_pt_hide_sriov_cap()
[all …]
A Dvsriov.c94 vf_pdev = pci_init_pdev(vf_bdf, pf_vdev->pdev->drhd_index); in create_vf()
271 struct pci_pdev *pdev = vdev->pdev; in init_vsriov() local
273 vdev->sriov.capoff = pdev->sriov.capoff; in init_vsriov()
274 vdev->sriov.caplen = pdev->sriov.caplen; in init_vsriov()
283 if (!vdev->pdev->sriov.hide_sriov) { in read_sriov_cap_reg()
285 *val = pci_pdev_read_cfg(vdev->pdev->bdf, offset, bytes); in read_sriov_cap_reg()
301 if (!vdev->pdev->sriov.hide_sriov) { in write_sriov_cap_reg()
313 pci_pdev_write_cfg(vdev->pdev->bdf, offset, bytes, val); in write_sriov_cap_reg()
320 pci_pdev_write_cfg(vdev->pdev->bdf, offset, bytes, val); in write_sriov_cap_reg()
333 pci_pdev_write_cfg(vdev->pdev->bdf, offset, bytes, val); in write_sriov_cap_reg()
[all …]
A Dvmsi.c43 union pci_bdf pbdf = vdev->pdev->bdf; in enable_disable_msi()
65 union pci_bdf pbdf = vdev->pdev->bdf; in remap_vmsi()
130 ptirq_remove_msix_remapping(vpci2vm(vdev->vpci), vdev->pdev->bdf.value, 1U); in deinit_vmsi()
140 struct pci_pdev *pdev = vdev->pdev; in init_vmsi() local
143 vdev->msi.capoff = pdev->msi_capoff; in init_vmsi()
146 val = pci_pdev_read_cfg(pdev->bdf, vdev->msi.capoff, 4U); in init_vmsi()
A Dvpci.c316 (uint8_t)(vdev->pdev->bdf.value & 0xFFU)); in assign_vdev_pt_iommu_domain()
333 (uint8_t)(vdev->pdev->bdf.value & 0xFFU)); in remove_vdev_pt_iommu_domain()
475 if (is_bridge(vdev->pdev)) { in read_cfg_header()
502 bool dev_is_bridge = is_bridge(vdev->pdev); in write_cfg_header()
521 if (pdev_need_bar_restore(vdev->pdev)) { in write_cfg_header()
522 pdev_restore_bar(vdev->pdev); in write_cfg_header()
620 if ((offset == vdev->pdev->sriov.pre_pos) && (vdev->pdev->sriov.hide_sriov)) { in read_pt_dev_cfg()
727 vdev->pdev = dev_config->pdev; in vpci_init_vdev()
813 (vdev_in_service_vm->pdev != NULL) && in vpci_assign_pcidev()
814 !is_host_bridge(vdev_in_service_vm->pdev) && !is_bridge(vdev_in_service_vm->pdev)) { in vpci_assign_pcidev()
[all …]
A Dvpci_bridge.c94 val = pci_pdev_read_cfg(vdev->pdev->bdf, offset, 4U); in init_vpci_bridge()
164 *val = pci_pdev_read_cfg(vdev->pdev->bdf, offset, bytes); in read_vpci_bridge_cfg()
A Dvmsix.c53 phy = pci_pdev_read_cfg(vdev->pdev->bdf, offset, bytes); in read_vmsix_cap_reg()
54 ctrl = pci_pdev_read_cfg(vdev->pdev->bdf, vdev->msix.capoff + PCIR_MSIX_CTRL, 2U); in read_vmsix_cap_reg()
127 if (vdev->pdev != NULL) { in rw_vmsix_table()
A Dvdev.c141 if ((vdev->pdev != NULL) && ((lo & PCI_BASE_ADDRESS_IO_MASK) != (uint32_t)vbar->base_hpa)) { in pci_vdev_update_vbar_base()
178 if (vdev->pdev != NULL) { in check_pt_dev_pio_bars()
/hypervisor/include/hw/
A Dpci.h317 static inline bool is_host_bridge(const struct pci_pdev *pdev) in is_host_bridge() argument
319 return (pdev->base_class == PCIC_BRIDGE) && (pdev->sub_class == PCIS_BRIDGE_HOST); in is_host_bridge()
322 static inline bool is_bridge(const struct pci_pdev *pdev) in is_bridge() argument
324 return ((pdev->hdr_type & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE); in is_bridge()
419 bool pdev_need_bar_restore(const struct pci_pdev *pdev);
420 void pdev_restore_bar(const struct pci_pdev *pdev);
422 void reserve_vmsix_on_msi_irtes(struct pci_pdev *pdev);
/hypervisor/include/arch/x86/asm/
A Dpci_dev.h15 struct acrn_vm_pci_dev_config *init_one_dev_config(struct pci_pdev *pdev);
A Dvm_config.h151 struct pci_pdev *pdev; /* the physical PCI device if it's a PT device */ member
/hypervisor/arch/x86/guest/
A Dvm.c407 static void deny_pci_bar_access(struct acrn_vm *service_vm, const struct pci_pdev *pdev) in deny_pci_bar_access() argument
416 for ( idx= 0; idx < pdev->nr_bars; idx++) { in deny_pci_bar_access()
417 vbar.bar_type.bits = pdev->bars[idx].phy_bar; in deny_pci_bar_access()
419 base = pdev->bars[idx].phy_bar; in deny_pci_bar_access()
420 size = pdev->bars[idx].size_mask; in deny_pci_bar_access()
423 base |= (((uint64_t)pdev->bars[idx].phy_bar) << 32UL); in deny_pci_bar_access()
424 size |= (((uint64_t)pdev->bars[idx].size_mask) << 32UL); in deny_pci_bar_access()
439 pdev->bdf.bits.b, pdev->bdf.bits.d, pdev->bdf.bits.f, idx, base); in deny_pci_bar_access()
453 if ( pci_devs[i].pdev != NULL) { in deny_pdevs()
454 deny_pci_bar_access(service_vm, pci_devs[i].pdev); in deny_pdevs()
/hypervisor/include/dm/
A Dvpci.h118 struct pci_pdev *pdev; member
/hypervisor/common/
A Dhypercall.c1011 if ((vdev != NULL) && (vdev->pdev->bdf.value == irq.phys_bdf)) { in hcall_set_ptdev_intr_info()
1064 if ((vdev != NULL) && (vdev->pdev->bdf.value == irq.phys_bdf)) { in hcall_reset_ptdev_intr_info()

Completed in 26 milliseconds