Lines Matching refs:config

279     pci_config_set_interrupt_pin(vdev->pdev.config, pin);  in vfio_intx_enable()
1852 for (tmp = pdev->config[PCI_CAPABILITY_LIST]; tmp; in vfio_std_cap_max_size()
1853 tmp = pdev->config[tmp + PCI_CAP_LIST_NEXT]) { in vfio_std_cap_max_size()
1863 static uint16_t vfio_ext_cap_max_size(const uint8_t *config, uint16_t pos) in vfio_ext_cap_max_size() argument
1868 tmp = PCI_EXT_CAP_NEXT(pci_get_long(config + tmp))) { in vfio_ext_cap_max_size()
1885 vfio_set_word_bits(vdev->pdev.config + pos, val, mask); in vfio_add_emulated_word()
1898 vfio_set_long_bits(vdev->pdev.config + pos, val, mask); in vfio_add_emulated_long()
1928 pos = parent->config + parent->exp.exp_cap + PCI_EXP_DEVCAP2; in vfio_pci_enable_rp_atomics()
1970 uint8_t *pos = parent->config + parent->exp.exp_cap + PCI_EXP_DEVCAP2; in vfio_pci_disable_rp_atomics()
1984 flags = pci_get_word(vdev->pdev.config + pos + PCI_CAP_FLAGS); in vfio_setup_pcie_cap()
2110 uint32_t cap = pci_get_long(vdev->pdev.config + pos + PCI_EXP_DEVCAP); in vfio_check_pcie_flr()
2120 uint16_t csr = pci_get_word(vdev->pdev.config + pos + PCI_PM_CTRL); in vfio_check_pm_reset()
2130 uint8_t cap = pci_get_byte(vdev->pdev.config + pos + PCI_AF_CAP); in vfio_check_af_flr()
2167 cap_id = pdev->config[pos]; in vfio_add_std_cap()
2168 next = pdev->config[pos + PCI_CAP_LIST_NEXT]; in vfio_add_std_cap()
2191 pdev->config[PCI_CAPABILITY_LIST] = 0; in vfio_add_std_cap()
2248 ctrl = pci_get_long(vdev->pdev.config + pos + PCI_REBAR_CTRL); in vfio_setup_rebar_ecap()
2255 ctrl = pci_get_long(vdev->pdev.config + pos + PCI_REBAR_CTRL + (i * 8)); in vfio_setup_rebar_ecap()
2297 uint8_t *config; in vfio_add_ext_cap() local
2301 !pci_get_long(pdev->config + PCI_CONFIG_SPACE_SIZE)) { in vfio_add_ext_cap()
2311 config = g_memdup(pdev->config, vdev->config_size); in vfio_add_ext_cap()
2337 pci_set_long(pdev->config + PCI_CONFIG_SPACE_SIZE, in vfio_add_ext_cap()
2343 next = PCI_EXT_CAP_NEXT(pci_get_long(config + next))) { in vfio_add_ext_cap()
2344 header = pci_get_long(config + next); in vfio_add_ext_cap()
2354 size = vfio_ext_cap_max_size(config, next); in vfio_add_ext_cap()
2378 if (pci_get_word(pdev->config + PCI_CONFIG_SPACE_SIZE) == 0xFFFF) { in vfio_add_ext_cap()
2379 pci_set_word(pdev->config + PCI_CONFIG_SPACE_SIZE, 0); in vfio_add_ext_cap()
2382 g_free(config); in vfio_add_ext_cap()
2390 if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) || in vfio_add_capabilities()
2391 !pdev->config[PCI_CAPABILITY_LIST]) { in vfio_add_capabilities()
2395 if (!vfio_add_std_cap(vdev, pdev->config[PCI_CAPABILITY_LIST], errp)) { in vfio_add_capabilities()
2634 pci_get_word(pdev->config + PCI_COMMAND), 2); in vfio_pci_load_config()
3030 ret = pread(vbasedev->fd, vdev->pdev.config, in vfio_realize()
3060 vdev->vendor_id = pci_get_word(pdev->config + PCI_VENDOR_ID); in vfio_realize()
3071 vdev->device_id = pci_get_word(pdev->config + PCI_DEVICE_ID); in vfio_realize()
3101 vdev->pdev.config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION; in vfio_realize()
3103 vdev->pdev.config[PCI_HEADER_TYPE] &= ~PCI_HEADER_TYPE_MULTI_FUNCTION; in vfio_realize()
3111 memset(&vdev->pdev.config[PCI_BASE_ADDRESS_0], 0, 24); in vfio_realize()
3112 memset(&vdev->pdev.config[PCI_ROM_ADDRESS], 0, 4); in vfio_realize()