• Home
  • Raw
  • Download

Lines Matching refs:vconfig

180 	memcpy(val, vdev->vconfig + pos, count);  in vfio_default_config_read()
217 memcpy(&virt_val, vdev->vconfig + pos, count); in vfio_default_config_write()
222 memcpy(vdev->vconfig + pos, &virt_val, count); in vfio_default_config_write()
259 memcpy(val, vdev->vconfig + pos, count); in vfio_direct_config_read()
262 memcpy(val, vdev->vconfig + pos, in vfio_direct_config_read()
265 memcpy(val, vdev->vconfig + pos, 1); in vfio_direct_config_read()
303 memcpy(vdev->vconfig + pos, &val, count); in vfio_virt_config_write()
311 memcpy(val, vdev->vconfig + pos, count); in vfio_virt_config_read()
402 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]); in __vfio_pci_memory_enabled()
473 vbar = (__le32 *)&vdev->vconfig[PCI_BASE_ADDRESS_0]; in vfio_bar_fixup()
495 vbar = (__le32 *)&vdev->vconfig[PCI_ROM_ADDRESS]; in vfio_bar_fixup()
528 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]); in vfio_basic_config_read()
564 virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND]; in vfio_basic_config_write()
755 __le16 *paddr = (__le16 *)(vdev->vconfig + pos - offset + PCI_VPD_ADDR); in vfio_vpd_config_write()
756 __le32 *pdata = (__le32 *)(vdev->vconfig + pos - offset + PCI_VPD_DATA); in vfio_vpd_config_write()
836 __le16 *ctrl = (__le16 *)(vdev->vconfig + pos - in vfio_exp_config_write()
920 u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL; in vfio_af_config_write()
1103 flags = (__le16 *)&vdev->vconfig[start]; in vfio_msi_config_read()
1128 pflags = (__le16 *)&vdev->vconfig[start + PCI_MSI_FLAGS]; in vfio_msi_config_write()
1430 __le32 *dwordp = (__le32 *)&vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1439 __le16 *wordp = (__le16 *)&vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1448 u8 *byte = &vdev->vconfig[offset]; in vfio_fill_vconfig_bytes()
1483 prev = &vdev->vconfig[PCI_CAPABILITY_LIST]; in vfio_cap_init()
1538 prev = &vdev->vconfig[pos + PCI_CAP_LIST_NEXT]; in vfio_cap_init()
1545 __le16 *vstatus = (__le16 *)&vdev->vconfig[PCI_STATUS]; in vfio_cap_init()
1635 *(__le32 *)&vdev->vconfig[epos] &= in vfio_ecap_init()
1640 prev = (__le32 *)&vdev->vconfig[epos]; in vfio_ecap_init()
1645 *(u32 *)&vdev->vconfig[PCI_CFG_SPACE_SIZE] = 0; in vfio_ecap_init()
1675 u8 *map, *vconfig; in vfio_config_init() local
1688 vconfig = kmalloc(pdev->cfg_size, GFP_KERNEL); in vfio_config_init()
1689 if (!vconfig) { in vfio_config_init()
1695 vdev->vconfig = vconfig; in vfio_config_init()
1713 vdev->rbar[0] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_0]); in vfio_config_init()
1714 vdev->rbar[1] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_1]); in vfio_config_init()
1715 vdev->rbar[2] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_2]); in vfio_config_init()
1716 vdev->rbar[3] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_3]); in vfio_config_init()
1717 vdev->rbar[4] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_4]); in vfio_config_init()
1718 vdev->rbar[5] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_5]); in vfio_config_init()
1719 vdev->rbar[6] = le32_to_cpu(*(__le32 *)&vconfig[PCI_ROM_ADDRESS]); in vfio_config_init()
1722 *(__le16 *)&vconfig[PCI_VENDOR_ID] = cpu_to_le16(pdev->vendor); in vfio_config_init()
1723 *(__le16 *)&vconfig[PCI_DEVICE_ID] = cpu_to_le16(pdev->device); in vfio_config_init()
1735 if (vconfig[PCI_INTERRUPT_PIN] && in vfio_config_init()
1739 vconfig[PCI_INTERRUPT_PIN]); in vfio_config_init()
1741 vconfig[PCI_INTERRUPT_PIN] = 0; /* Gratuitous for good VFs */ in vfio_config_init()
1751 *(__le16 *)&vconfig[PCI_COMMAND] |= in vfio_config_init()
1756 vconfig[PCI_INTERRUPT_PIN] = 0; in vfio_config_init()
1771 kfree(vconfig); in vfio_config_init()
1772 vdev->vconfig = NULL; in vfio_config_init()
1778 kfree(vdev->vconfig); in vfio_config_free()
1779 vdev->vconfig = NULL; in vfio_config_free()