search for: pci_status_cap_list

Displaying 12 results from an estimated 12 matches for "pci_status_cap_list".

2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...1; + else if (i - offset + 1 == size) + return offset; + return 0; +} + +static uint8_t pci_find_capability_list(PCIDevice *pdev, uint8_t cap_id, + uint8_t *prev_p) +{ + uint8_t next, prev; + + if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST)) + return 0; + + for (prev = PCI_CAPABILITY_LIST; (next = pdev->config[prev]); + prev = next + PCI_CAP_LIST_NEXT) + if (pdev->config[next + PCI_CAP_LIST_ID] == cap_id) + break; + + *prev_p = prev; + return next; +} + +/* Reserve space and add capabil...
2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...1; + else if (i - offset + 1 == size) + return offset; + return 0; +} + +static uint8_t pci_find_capability_list(PCIDevice *pdev, uint8_t cap_id, + uint8_t *prev_p) +{ + uint8_t next, prev; + + if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST)) + return 0; + + for (prev = PCI_CAPABILITY_LIST; (next = pdev->config[prev]); + prev = next + PCI_CAP_LIST_NEXT) + if (pdev->config[next + PCI_CAP_LIST_ID] == cap_id) + break; + + *prev_p = prev; + return next; +} + +/* Reserve space and add capabil...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...1; + else if (i - offset + 1 == size) + return offset; + return 0; +} + +static uint8_t pci_find_capability_list(PCIDevice *pdev, uint8_t cap_id, + uint8_t *prev_p) +{ + uint8_t next, prev; + + if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST)) + return 0; + + for (prev = PCI_CAPABILITY_LIST; (next = pdev->config[prev]); + prev = next + PCI_CAP_LIST_NEXT) + if (pdev->config[next + PCI_CAP_LIST_ID] != cap_id) + break; + + *prev_p = prev; + return next; +} + +/* Reserve space and add capabil...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...1; + else if (i - offset + 1 == size) + return offset; + return 0; +} + +static uint8_t pci_find_capability_list(PCIDevice *pdev, uint8_t cap_id, + uint8_t *prev_p) +{ + uint8_t next, prev; + + if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST)) + return 0; + + for (prev = PCI_CAPABILITY_LIST; (next = pdev->config[prev]); + prev = next + PCI_CAP_LIST_NEXT) + if (pdev->config[next + PCI_CAP_LIST_ID] != cap_id) + break; + + *prev_p = prev; + return next; +} + +/* Reserve space and add capabil...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
.....4806112 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1151,6 +1151,8 @@ struct PCIDevice *init_assigned_device(AssignedDevInfo *adev, PCIBus *bus) assigned_device_pci_cap_init) < 0) goto assigned_out; + pci_dev->config[PCI_STATUS] |= PCI_STATUS_CAP_LIST; + /* assign device to guest */ r = assign_device(adev); if (r < 0) diff --git a/hw/msix.c b/hw/msix.c new file mode 100644 index 0000000..323eabc --- /dev/null +++ b/hw/msix.c @@ -0,0 +1,447 @@ +/* + * MSI-X device support + * + * This module includes support for MSI-X in pci dev...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
.....4806112 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1151,6 +1151,8 @@ struct PCIDevice *init_assigned_device(AssignedDevInfo *adev, PCIBus *bus) assigned_device_pci_cap_init) < 0) goto assigned_out; + pci_dev->config[PCI_STATUS] |= PCI_STATUS_CAP_LIST; + /* assign device to guest */ r = assign_device(adev); if (r < 0) diff --git a/hw/msix.c b/hw/msix.c new file mode 100644 index 0000000..323eabc --- /dev/null +++ b/hw/msix.c @@ -0,0 +1,447 @@ +/* + * MSI-X device support + * + * This module includes support for MSI-X in pci dev...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...int *domp, int *busp, unsigned *slotp) return pci_parse_devaddr(devaddr, domp, busp, slotp); } +static void pci_init_cmask(PCIDevice *dev) +{ + pci_set_word(dev->cmask + PCI_VENDOR_ID, 0xffff); + pci_set_word(dev->cmask + PCI_DEVICE_ID, 0xffff); + dev->cmask[PCI_STATUS] = PCI_STATUS_CAP_LIST; + dev->cmask[PCI_REVISION_ID] = 0xff; + dev->cmask[PCI_CLASS_PROG] = 0xff; + pci_set_word(dev->cmask + PCI_CLASS_DEVICE, 0xffff); + dev->cmask[PCI_HEADER_TYPE] = 0xff; + dev->cmask[PCI_CAPABILITY_LIST] = 0xff; +} + static void pci_init_wmask(PCIDevice *dev) { i...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...int *domp, int *busp, unsigned *slotp) return pci_parse_devaddr(devaddr, domp, busp, slotp); } +static void pci_init_cmask(PCIDevice *dev) +{ + pci_set_word(dev->cmask + PCI_VENDOR_ID, 0xffff); + pci_set_word(dev->cmask + PCI_DEVICE_ID, 0xffff); + dev->cmask[PCI_STATUS] = PCI_STATUS_CAP_LIST; + dev->cmask[PCI_REVISION_ID] = 0xff; + dev->cmask[PCI_CLASS_PROG] = 0xff; + pci_set_word(dev->cmask + PCI_CLASS_DEVICE, 0xffff); + dev->cmask[PCI_HEADER_TYPE] = 0xff; + dev->cmask[PCI_CAPABILITY_LIST] = 0xff; +} + static void pci_init_wmask(PCIDevice *dev) { i...
2009 May 20
0
[PATCHv2-RFC 2/2] qemu-kvm: use common code for assigned msix
...le_capability_support(pci_dev, 0, NULL, + if (pci_enable_capability_support(pci_dev, NULL, assigned_device_pci_cap_write_config, assigned_device_pci_cap_init) < 0) - goto assigned_out; + goto out; - pci_dev->config[PCI_STATUS] |= PCI_STATUS_CAP_LIST; + /* handle real device's MMIO/PIO BARs */ + if (assigned_dev_register_regions(dev->real_device.regions, + dev->real_device.region_number, + dev)) + goto out; /* assign device to guest */ r...
2009 May 20
0
[PATCHv2-RFC 2/2] qemu-kvm: use common code for assigned msix
...le_capability_support(pci_dev, 0, NULL, + if (pci_enable_capability_support(pci_dev, NULL, assigned_device_pci_cap_write_config, assigned_device_pci_cap_init) < 0) - goto assigned_out; + goto out; - pci_dev->config[PCI_STATUS] |= PCI_STATUS_CAP_LIST; + /* handle real device's MMIO/PIO BARs */ + if (assigned_dev_register_regions(dev->real_device.regions, + dev->real_device.region_number, + dev)) + goto out; /* assign device to guest */ r...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...sys_id), + .bar[0] = cpu_to_le32(vpci->mmio_addr + | PCI_BASE_ADDRESS_SPACE_MEMORY), + .bar[1] = cpu_to_le32(vpci->port_addr + | PCI_BASE_ADDRESS_SPACE_IO), + .bar[2] = cpu_to_le32(vpci->msix_io_block + | PCI_BASE_ADDRESS_SPACE_MEMORY), + .status = cpu_to_le16(PCI_STATUS_CAP_LIST), + .capabilities = (void *)&vpci->pci_hdr.msix - (void *)&vpci->pci_hdr, + .bar_size[0] = cpu_to_le32(IOPORT_SIZE), + .bar_size[1] = cpu_to_le32(IOPORT_SIZE), + .bar_size[2] = cpu_to_le32(PCI_IO_SIZE*2), + }; + + vpci->dev_hdr = (struct device_header) { + .bus_type = DEV...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...sys_id), + .bar[0] = cpu_to_le32(vpci->mmio_addr + | PCI_BASE_ADDRESS_SPACE_MEMORY), + .bar[1] = cpu_to_le32(vpci->port_addr + | PCI_BASE_ADDRESS_SPACE_IO), + .bar[2] = cpu_to_le32(vpci->msix_io_block + | PCI_BASE_ADDRESS_SPACE_MEMORY), + .status = cpu_to_le16(PCI_STATUS_CAP_LIST), + .capabilities = (void *)&vpci->pci_hdr.msix - (void *)&vpci->pci_hdr, + .bar_size[0] = cpu_to_le32(IOPORT_SIZE), + .bar_size[1] = cpu_to_le32(IOPORT_SIZE), + .bar_size[2] = cpu_to_le32(PCI_IO_SIZE*2), + }; + + vpci->dev_hdr = (struct device_header) { + .bus_type = DEV...