{"push_id":885845636,"size":1,"distinct_size":0,"ref":"refs/heads/<1448987005-28335-1-git-send-email-shmulik.ladkani@ravellosystems.com>","head":"7c14c4f32022b5c5f79e6b674ed1dbf1af1841a7","before":"9451ec3b31c14f3808704968f290db61c0039a70","commits":[{"sha":"7c14c4f32022b5c5f79e6b674ed1dbf1af1841a7","author":{"email":"17d95d1f97e0668e532c695f667f3a3b359c14b2@ravellosystems.com","name":"Shmulik Ladkani"},"message":"virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method\n\nIn 1811e64 'hw/virtio: Add PCIe capability to virtio devices', the\nQEMU_PCI_CAP_EXPRESS capability was added to virtio's pci_dev, within\n'virtio_pci_realize' - the pci device object realization method.\n\nThis occurs to late, as 'pci_qdev_realize' (DeviceClass.realize of\nTYPE_PCI_DEVICE) has already been called, without knowing that the\ndevice instance is indeed an \"express\" instance, thus allocating\ninsufficient pci config space.\n\nAs a result, device may crash upon attempt to write to the PCIE config\nspace.\n\nFix, by arming the QEMU_PCI_CAP_EXPRESS capability early in virtio-pci's\nown DeviceClass realize method.\n\nThis also makes code cleaner, as 'virtio_pci_realize' may now access the\n'pci_is_express' predicate when needed.\n\nSigned-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>\nMessage-Id: <1448987005-28335-1-git-send-email-shmulik.ladkani@ravellosystems.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/7c14c4f32022b5c5f79e6b674ed1dbf1af1841a7"}]}