)]}'
{
  "commit": "623db856476806124e9ae45fbc39e75012261570",
  "tree": "07471a5342db9dbc0b5c26167aa2aacf41794c2a",
  "parents": [
    "fff77cfb8413190c6362b95203ef0973c83b50d2"
  ],
  "author": {
    "name": "Kevin Wolf",
    "email": "kwolf@redhat.com",
    "time": "Thu Dec 04 18:26:57 2025 +0100"
  },
  "committer": {
    "name": "Michael S. Tsirkin",
    "email": "mst@redhat.com",
    "time": "Thu Feb 05 05:06:46 2026 -0500"
  },
  "message": "virtio: Fix crash when sriov-pf is set for non-PCI-Express device\n\nSetting the sriov-pf property on devices that aren\u0027t PCI Express causes\nan assertion failure:\n\n    $ qemu-system-x86_64 \\\n        -blockdev null-co,node-name\u003dnull \\\n        -blockdev null-co,node-name\u003dnull2 \\\n        -device virtio-blk,drive\u003dnull,id\u003dpf \\\n        -device virtio-blk,sriov-pf\u003dpf,drive\u003dnull2\n    qemu-system-x86_64: ../hw/pci/pcie.c:1062: void pcie_add_capability(PCIDevice *, uint16_t, uint8_t, uint16_t, uint16_t): Assertion `offset \u003e\u003d PCI_CONFIG_SPACE_SIZE\u0027 failed.\n\nThis is because proxy-\u003elast_pcie_cap_offset is only initialised to a\nnon-zero value in virtio_pci_realize() if it\u0027s a PCI Express device, and\nthen virtio_pci_device_plugged() still tries to use it.\n\nTo fix this, just skip the SR-IOV code for !pci_is_express(). Then the\nnext thing pci_qdev_realize() does is call pcie_sriov_register_device(),\nwhich returns the appropriate error.\n\nCc: qemu-stable@nongnu.org\nFixes: d0c280d3fac6 (\u0027pcie_sriov: Make a PCI device with user-created VF ARI-capable\u0027)\nSigned-off-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\nReviewed-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\nReviewed-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nMessage-Id: \u003c20251204172657.174391-1-kwolf@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b273eb269196b3985b0fad62a92fdfe2e85724f4",
      "old_mode": 33188,
      "old_path": "hw/virtio/virtio-pci.c",
      "new_id": "1e8f90df34ed3b66ed382a62ca8f6228795733e1",
      "new_mode": 33188,
      "new_path": "hw/virtio/virtio-pci.c"
    }
  ]
}
