Skip to content

hw/pci: Ensure capabilities are added before calling pci_qdev_realize()

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/pci/msi: Fix debug format stringhw/pci/msi.c+1 -10 replies
2/4hw/pci/msi: Ensure msi_init() is called before device is realizedhw/pci/msi.c+2 -00 replies
3/4hw/pci: Add sanity check in pci_find_space()hw/pci/pci.c+1 -00 replies
4/4hw/pci: Ensure pci_add_capability() is called before device is realizedhw/pci/pci.c+3 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] hw/pci: Ensure capabilities are added before calling pci_qdev_realize()

Per MST in [*]: "Calling pci_add_capability when VM is running is likely to confuse guests".
Ensure this can't happen by asserting pci_add_capability() is never called after a PCI device is realized.

[*] https://lore.kernel.org/qemu-devel/[email protected]/
Based-on: <[email protected]>
"hw/i386/amd_iommu: Orphanize & QDev cleanups"

Philippe Mathieu-Daudé (4):
hw/pci/msi: Fix debug format string
hw/pci/msi: Ensure msi_init() is called before device is realized hw/pci: Add sanity check in pci_find_space()
hw/pci: Ensure pci_add_capability() is called before device is
realized

 hw/pci/msi.c | 4 +++-
 hw/pci/pci.c | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.1