Now updated msi implemenation by following the review. Other patches were just adjusted.
Michael, thank you for merging portion of patch series. That makes my life much easier. > pcie port: define struct PCIEPort/PCIESlot and helper functions > msix: clear not only INTA, but all INTx when MSI-X is enabled. These 2 patches don't depend on MSI. Other patches do. changes v1 -> v2: - update msi - dropped already pushed out patches. - added msix patches. Patch description: This patch series implements pcie port switch emulators which is basic part for pcie/q35 support. This is for mst/pci tree. Isaku Yamahata (9): msi: implemented msi. pcie: helper functions for pcie extended capability. pcie port: define struct PCIEPort/PCIESlot and helper functions pcie root port: implement pcie root port. pcie upstream port: pci express switch upstream port. pcie downstream port: pci express switch downstream port. pcie/hotplug: glue pushing attention button command. pcie_abp pcie/aer: glue aer error injection into qemu monitor. msix: clear not only INTA, but all INTx when MSI-X is enabled. Makefile.objs | 6 +- hw/msi.c | 360 +++++++++++ hw/msi.h | 41 ++ hw/msix.c | 5 +- hw/pci.h | 34 +- hw/pcie.c | 1753 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/pcie.h | 186 ++++++ hw/pcie_downstream.c | 225 +++++++ hw/pcie_downstream.h | 33 + hw/pcie_port.c | 188 ++++++ hw/pcie_port.h | 51 ++ hw/pcie_root.c | 248 +++++++ hw/pcie_root.h | 32 + hw/pcie_upstream.c | 207 ++++++ hw/pcie_upstream.h | 32 + qemu-common.h | 3 + qemu-monitor.hx | 36 + sysemu.h | 9 + 18 files changed, 3443 insertions(+), 6 deletions(-) create mode 100644 hw/msi.c create mode 100644 hw/msi.h create mode 100644 hw/pcie.c create mode 100644 hw/pcie.h create mode 100644 hw/pcie_downstream.c create mode 100644 hw/pcie_downstream.h create mode 100644 hw/pcie_port.c create mode 100644 hw/pcie_port.h create mode 100644 hw/pcie_root.c create mode 100644 hw/pcie_root.h create mode 100644 hw/pcie_upstream.c create mode 100644 hw/pcie_upstream.h