Lines Matching refs:bus

32     value |= (pcidev->bus & 0xff) << 8;  in pcidev_encode_bdf()
40 unsigned int bus, unsigned int dev, in pcidev_struct_fill() argument
44 pcidev->bus = bus; in pcidev_struct_fill()
53 …flexarray_append(back, GCSPRINTF(PCI_BDF, pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func)); in libxl_create_pci_backend_device()
55 …flexarray_append(back, GCSPRINTF(PCI_BDF, pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func)); in libxl_create_pci_backend_device()
217 unsigned int domain = 0, bus = 0, dev = 0, func = 0; in libxl__device_pci_remove_xenstore() local
219 sscanf(xsdev, PCI_BDF, &domain, &bus, &dev, &func); in libxl__device_pci_remove_xenstore()
220 if (domain == pcidev->domain && bus == pcidev->bus && in libxl__device_pci_remove_xenstore()
329 unsigned dom, bus, dev, func; in get_all_assigned_devices() local
330 if ( sscanf(bdf, PCI_BDF, &dom, &bus, &dev, &func) != 4 ) in get_all_assigned_devices()
336 pcidev_struct_fill(*list + *num, dom, bus, dev, func, 0); in get_all_assigned_devices()
348 int dom, int bus, int dev, int func) in is_pcidev_in_array() argument
355 if ( assigned[i].bus != bus ) in is_pcidev_in_array()
380 buf = GCSPRINTF(PCI_BDF, pcidev->domain, pcidev->bus, in sysfs_write_bdf()
418 unsigned dom, bus, dev, func; in libxl_device_pci_assignable_list() local
419 if (sscanf(de->d_name, PCI_BDF, &dom, &bus, &dev, &func) != 4) in libxl_device_pci_assignable_list()
422 if (is_pcidev_in_array(assigned, num_assigned, dom, bus, dev, func)) in libxl_device_pci_assignable_list()
433 pcidev_struct_fill(new, dom, bus, dev, func, 0); in libxl_device_pci_assignable_list()
453 pcidev->bus, in sysfs_dev_unbind()
485 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_vendor()
493 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_vendor()
501 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_vendor()
512 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_device()
520 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_device()
528 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_device()
539 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_class()
546 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_class()
555 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in sysfs_dev_get_class()
612 unsigned dom, bus, dev, func; in pciback_dev_has_slot() local
621 while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) { in pciback_dev_has_slot()
623 && bus == pcidev->bus in pciback_dev_has_slot()
651 pcidev->domain, pcidev->bus, in pciback_dev_is_assigned()
714 pcidev->bus, in pci_assignable_driver_path_write()
729 pcidev->bus, in pci_assignable_driver_path_read()
743 pcidev->bus, in pci_assignable_driver_path_remove()
752 unsigned dom, bus, dev, func; in libxl__device_pci_assignable_add() local
759 bus = pcidev->bus; in libxl__device_pci_assignable_add()
764 spath = GCSPRINTF(SYSFS_PCI_DEV"/"PCI_BDF, dom, bus, dev, func); in libxl__device_pci_assignable_add()
776 LOG(WARN, PCI_BDF" already assigned to pciback", dom, bus, dev, func); in libxl__device_pci_assignable_add()
783 dom, bus, dev, func); in libxl__device_pci_assignable_add()
794 dom, bus, dev, func, driver_path); in libxl__device_pci_assignable_add()
797 dom, bus, dev, func); in libxl__device_pci_assignable_add()
897 unsigned dom, bus, dev, func; in pci_multifunction_check() local
901 if ( sscanf(de->d_name, PCI_BDF, &dom, &bus, &dev, &func) != 4 ) in pci_multifunction_check()
905 if ( pcidev->bus != bus ) in pci_multifunction_check()
910 path = GCSPRINTF("%s/" PCI_BDF, SYSFS_PCIBACK_DRIVER, dom, bus, dev, func); in pci_multifunction_check()
914 dom, bus, dev, func); in pci_multifunction_check()
956 pcidev->domain, pcidev->bus, pcidev->dev, in qemu_pci_add_xenstore()
961 pcidev->domain, pcidev->bus, pcidev->dev, in qemu_pci_add_xenstore()
1018 pcidev->bus, pcidev->dev, pcidev->func); in do_pci_add()
1058 pcidev->bus, pcidev->dev, pcidev->func); in do_pci_add()
1111 static int libxl__device_pci_reset(libxl__gc *gc, unsigned int domain, unsigned int bus, in libxl__device_pci_reset() argument
1120 char *buf = GCSPRINTF(PCI_BDF, domain, bus, dev, func); in libxl__device_pci_reset()
1129 reset = GCSPRINTF("%s/"PCI_BDF"/reset", SYSFS_PCI_DEV, domain, bus, dev, func); in libxl__device_pci_reset()
1141 domain, bus, dev, func); in libxl__device_pci_reset()
1176 pcidevs[i].bus == pcidev->bus && in libxl_pcidev_assignable()
1198 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func, in libxl__device_pci_add()
1216 pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in libxl__device_pci_add()
1228 pcidev->bus, pcidev->dev, pcidev->func) ) { in libxl__device_pci_add()
1234 libxl__device_pci_reset(gc, pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in libxl__device_pci_add()
1328 pcidev->bus, pcidev->dev, pcidev->func); in qemu_pci_remove_xenstore()
1371 pcidev->bus, pcidev->dev, pcidev->func) ) { in do_pci_remove()
1402 pcidev->bus, pcidev->dev, pcidev->func); in do_pci_remove()
1438 pcidev->bus, pcidev->dev, pcidev->func); in do_pci_remove()
1459 libxl__device_pci_reset(gc, pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); in do_pci_remove()
1551 unsigned int domain = 0, bus = 0, dev = 0, func = 0, vdevfn = 0; in libxl__device_pci_from_xs_be() local
1554 sscanf(s, PCI_BDF, &domain, &bus, &dev, &func); in libxl__device_pci_from_xs_be()
1560 pcidev_struct_fill(pci, domain, bus, dev, func, vdevfn); in libxl__device_pci_from_xs_be()