search for: pci_status

Displaying 13 results from an estimated 13 matches for "pci_status".

Did you mean: sci_status
2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...offset = i + 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; +} + +/* Re...
2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...offset = i + 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; +} + +/* Re...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...offset = i + 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; +} + +/* Re...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...offset = i + 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; +} + +/* Re...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...st char *addr, 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(PC...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...st char *addr, 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(PC...
2020 Oct 05
2
PCI Passthrough and Surprise Hotplug
...emoved): [67720.177959] pciehp 0000:40:01.2:pcie004: Slot(238-1): Link Down [67720.178027] vfio-pci 0000:42:00.0: Relaying device request to user (#0) And naturally, inside of the Linux VM, we see the NVMe controller drop: [ 1203.491536] nvme nvme1: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 1203.522759] blk_update_request: I/O error, dev nvme1n2, sector 33554304 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 1203.560505] nvme 0000:01:0f.0: Refused to change power state, currently in D3 [ 1203.561104] nvme nvme1: Removing after probe failure status: -19 [ 1203.583506] B...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...c index 624d15a..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 supp...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...c index 624d15a..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 supp...
2020 Oct 07
0
Re: PCI Passthrough and Surprise Hotplug
...ciehp 0000:40:01.2:pcie004: Slot(238-1): Link Down > [67720.178027] vfio-pci 0000:42:00.0: Relaying device request to user (#0) > > And naturally, inside of the Linux VM, we see the NVMe controller drop: > [ 1203.491536] nvme nvme1: controller is down; will reset: > CSTS=0xffffffff, PCI_STATUS=0xffff > [ 1203.522759] blk_update_request: I/O error, dev nvme1n2, sector > 33554304 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 > [ 1203.560505] nvme 0000:01:0f.0: Refused to change power state, currently in D3 > [ 1203.561104] nvme nvme1: Removing after probe failure status:...
2009 May 20
0
[PATCHv2-RFC 2/2] qemu-kvm: use common code for assigned msix
...if (pci_enable_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 d...
2009 May 20
0
[PATCHv2-RFC 2/2] qemu-kvm: use common code for assigned msix
...if (pci_enable_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 d...
2013 Feb 07
41
Patch series for IGD passthrough
This series contains all the fixes required to produce a working IGD passthrough box. All the changes are previously seen in the dev list but not yet accepted. Some of them are out-dated and need some reshape. Detailed description can be found later in each patch. . [PATCH 1/3] qemu-xen-trad/pt_msi_disable: do not clear all MSI flags . [PATCH 2/3] qemu-xen-trad: Correctly expose PCH ISA bridge