search for: pci_bridge_resources

Displaying 20 results from an estimated 24 matches for "pci_bridge_resources".

2008 Oct 08
8
[PATCH] dom0 linux: Reassign memory resources to device for pci passthrough.
...pci_name(dev)); + pci_disable_device(dev); + + for (i=0; i < PCI_NUM_RESOURCES; i++) { + r = &dev->resource[i]; + if ((r == NULL) || + !(r->flags & IORESOURCE_MEM)) + continue; + + r->end = r->end - r->start; + r->start = 0; + + if (i < PCI_BRIDGE_RESOURCES) { + pci_update_resource(dev, r, i); + } else if (i == 8 || i == 9) { + /* need to update(clear) the Base/Limit + * register also, because PCI bridge is + * disabled and the resource is + * released. + */ + pci_update_bridge(dev, i); + } + } + } + return;...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...100,13 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) struct pci_dev * pci_dev = to_pci_dev(dev); char * str = buf; int i; - int max = 7; + int max; resource_size_t start, end; if (pci_dev->subordinate) max = DEVICE_COUNT_RESOURCE; + else + max = PCI_BRIDGE_RESOURCES; for (i = 0; i < max; i++) { struct resource *res = &pci_dev->resource[i]; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c9884bb..c1108ed 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -356,25 +356,10 @@ pci_find_parent_resource(const struct pci_dev *dev, str...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...100,13 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) struct pci_dev * pci_dev = to_pci_dev(dev); char * str = buf; int i; - int max = 7; + int max; resource_size_t start, end; if (pci_dev->subordinate) max = DEVICE_COUNT_RESOURCE; + else + max = PCI_BRIDGE_RESOURCES; for (i = 0; i < max; i++) { struct resource *res = &pci_dev->resource[i]; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c9884bb..c1108ed 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -356,25 +356,10 @@ pci_find_parent_resource(const struct pci_dev *dev, str...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...100,13 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) struct pci_dev * pci_dev = to_pci_dev(dev); char * str = buf; int i; - int max = 7; + int max; resource_size_t start, end; if (pci_dev->subordinate) max = DEVICE_COUNT_RESOURCE; + else + max = PCI_BRIDGE_RESOURCES; for (i = 0; i < max; i++) { struct resource *res = &pci_dev->resource[i]; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c9884bb..c1108ed 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -356,25 +356,10 @@ pci_find_parent_resource(const struct pci_dev *dev, str...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...dev); char * str = buf; int i; - int max = 7; + int max; resource_size_t start, end; - if (pci_dev->subordinate) - max = DEVICE_COUNT_RESOURCE; + max = pci_dev->subordinate ? DEVICE_COUNT_RESOURCE : + PCI_BRIDGE_RESOURCES; for (i = 0; i < max; i++) { struct resource *res = &pci_dev->resource[i]; @@ -716,10 +716,40 @@ int __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev) return 0; } +static int pci_create_capabilities_sysfs(struct pci_dev *dev) +{ +...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...dev); char * str = buf; int i; - int max = 7; + int max; resource_size_t start, end; - if (pci_dev->subordinate) - max = DEVICE_COUNT_RESOURCE; + max = pci_dev->subordinate ? DEVICE_COUNT_RESOURCE : + PCI_BRIDGE_RESOURCES; for (i = 0; i < max; i++) { struct resource *res = &pci_dev->resource[i]; @@ -716,10 +716,40 @@ int __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev) return 0; } +static int pci_create_capabilities_sysfs(struct pci_dev *dev) +{ +...
2008 Oct 21
16
[PATCH 0/15 v5] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Major changes between v4 -> v5: 1, remove interfaces for PF driver to create sysfs entries (Matthew
2008 Oct 21
16
[PATCH 0/15 v5] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Major changes between v4 -> v5: 1, remove interfaces for PF driver to create sysfs entries (Matthew
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Oct 14
8
[PATCH 0/8 v4] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. [PATCH 1/8 v4] PCI: define PCI resource names in a 'enum' [PATCH 2/8 v4] PCI: export __pci_read_base
2008 Oct 14
8
[PATCH 0/8 v4] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. [PATCH 1/8 v4] PCI: define PCI resource names in a 'enum' [PATCH 2/8 v4] PCI: export __pci_read_base
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...em32, res, rom); } } @@ -366,9 +362,6 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) child->resource[i] = child->parent->resource[i - 3]; } - for(i=0; i<3; i++) - child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i]; - res = child->resource[0]; pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo); pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo); @@ -461,7 +454,7 @@ static struct pci_bus * pci_alloc_bus(void) return b; } -static struct pci_bus *pci_alloc_chil...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...em32, res, rom); } } @@ -366,9 +362,6 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) child->resource[i] = child->parent->resource[i - 3]; } - for(i=0; i<3; i++) - child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i]; - res = child->resource[0]; pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo); pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo); @@ -461,7 +454,7 @@ static struct pci_bus * pci_alloc_bus(void) return b; } -static struct pci_bus *pci_alloc_chil...
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Sep 27
0
[PATCH 4/9] dom0 PCI: support SR-IOV capability
...(struct pci_dev *dev, int resno) { + resource_size_t align; struct resource *res = dev->resource + resno; if (resno <= PCI_ROM_RESOURCE) return res->end - res->start + 1; - else if (resno <= PCI_BRIDGE_RES_END) + else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + align = pci_iov_resource_align(dev, resno); + if (align) + return align; + } else if (resno <= PCI_BRIDGE_RES_END) return res->start; dev_err(&dev-&g...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
.../pci.c index bc4b6d0..cd651e0 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1867,7 +1867,12 @@ int pci_resource_alignment(struct pci_dev *dev, int resno) if (resno <= PCI_ROM_RESOURCE) return resource_size(res); - else if (resno <= PCI_BRIDGE_RES_END) + else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + align = pci_iov_resource_align(dev, resno); + if (align) + return align; + } else if (resno <= PCI_BRIDGE_RES_END) return res->start; dev_err(&dev->dev, "alignment: invalid resource #: %d\n", resno); @@ -1884,12 +1889,1...