Lines Matching refs:vconfig
181 memcpy(val, vdev->vconfig + pos, count); in vfio_default_config_read()
218 memcpy(&virt_val, vdev->vconfig + pos, count); in vfio_default_config_write()
223 memcpy(vdev->vconfig + pos, &virt_val, count); in vfio_default_config_write()
260 memcpy(val, vdev->vconfig + pos, count); in vfio_direct_config_read()
263 memcpy(val, vdev->vconfig + pos, in vfio_direct_config_read()
266 memcpy(val, vdev->vconfig + pos, 1); in vfio_direct_config_read()
304 memcpy(vdev->vconfig + pos, &val, count); in vfio_virt_config_write()
312 memcpy(val, vdev->vconfig + pos, count); in vfio_virt_config_read()
403 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]); in __vfio_pci_memory_enabled()
477 vbar = (__le32 *)&vdev->vconfig[PCI_BASE_ADDRESS_0]; in vfio_bar_fixup()
499 vbar = (__le32 *)&vdev->vconfig[PCI_ROM_ADDRESS]; in vfio_bar_fixup()
532 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]); in vfio_basic_config_read()
568 virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND]; in vfio_basic_config_write()
792 __le16 *paddr = (__le16 *)(vdev->vconfig + pos - offset + PCI_VPD_ADDR); in vfio_vpd_config_write()
793 __le32 *pdata = (__le32 *)(vdev->vconfig + pos - offset + PCI_VPD_DATA); in vfio_vpd_config_write()
873 __le16 *ctrl = (__le16 *)(vdev->vconfig + pos - in vfio_exp_config_write()
957 u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL; in vfio_af_config_write()
1141 flags = (__le16 *)&vdev->vconfig[start]; in vfio_msi_config_read()
1166 pflags = (__le16 *)&vdev->vconfig[start + PCI_MSI_FLAGS]; in vfio_msi_config_write()
1461 __le16 *pmc = (__le16 *)&vdev->vconfig[offset + PCI_PM_PMC]; in vfio_update_pm_vconfig_bytes()
1462 __le16 *ctrl = (__le16 *)&vdev->vconfig[offset + PCI_PM_CTRL]; in vfio_update_pm_vconfig_bytes()
1484 __le32 *dwordp = (__le32 *)&vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1493 __le16 *wordp = (__le16 *)&vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1502 u8 *byte = &vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1537 prev = &vdev->vconfig[PCI_CAPABILITY_LIST]; in vfio_cap_init()
1595 prev = &vdev->vconfig[pos + PCI_CAP_LIST_NEXT]; in vfio_cap_init()
1602 __le16 *vstatus = (__le16 *)&vdev->vconfig[PCI_STATUS]; in vfio_cap_init()
1692 *(__le32 *)&vdev->vconfig[epos] &= in vfio_ecap_init()
1697 prev = (__le32 *)&vdev->vconfig[epos]; in vfio_ecap_init()
1702 *(u32 *)&vdev->vconfig[PCI_CFG_SPACE_SIZE] = 0; in vfio_ecap_init()
1732 u8 *map, *vconfig; in vfio_config_init() local
1745 vconfig = kmalloc(pdev->cfg_size, GFP_KERNEL_ACCOUNT); in vfio_config_init()
1746 if (!vconfig) { in vfio_config_init()
1752 vdev->vconfig = vconfig; in vfio_config_init()
1770 vdev->rbar[0] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_0]); in vfio_config_init()
1771 vdev->rbar[1] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_1]); in vfio_config_init()
1772 vdev->rbar[2] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_2]); in vfio_config_init()
1773 vdev->rbar[3] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_3]); in vfio_config_init()
1774 vdev->rbar[4] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_4]); in vfio_config_init()
1775 vdev->rbar[5] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_5]); in vfio_config_init()
1776 vdev->rbar[6] = le32_to_cpu(*(__le32 *)&vconfig[PCI_ROM_ADDRESS]); in vfio_config_init()
1779 *(__le16 *)&vconfig[PCI_VENDOR_ID] = cpu_to_le16(pdev->vendor); in vfio_config_init()
1780 *(__le16 *)&vconfig[PCI_DEVICE_ID] = cpu_to_le16(pdev->device); in vfio_config_init()
1792 if (vconfig[PCI_INTERRUPT_PIN] && in vfio_config_init()
1796 vconfig[PCI_INTERRUPT_PIN]); in vfio_config_init()
1798 vconfig[PCI_INTERRUPT_PIN] = 0; /* Gratuitous for good VFs */ in vfio_config_init()
1808 *(__le16 *)&vconfig[PCI_COMMAND] |= in vfio_config_init()
1813 vconfig[PCI_INTERRUPT_PIN] = 0; in vfio_config_init()
1828 kfree(vconfig); in vfio_config_init()
1829 vdev->vconfig = NULL; in vfio_config_init()
1835 kfree(vdev->vconfig); in vfio_config_free()
1836 vdev->vconfig = NULL; in vfio_config_free()