I was going through Arm (S)BSA tests run against sbsa-ref. Many of them
check for presence of other cards than "Root Complex Integrated
Endpoint" ones.
The "-device root-pcie-port" etc arguments can be used to add such ones
but I was wondering how to add them directly in C code. Tried to find is
there any example but looks like all systems use flat structure.
So the question is: How to add pcie-root-port and device behind it in C?
Something like those two arguments but in C:
-device pcie-root-port,id=JBHBE,slot=0,chassis=0
-device igb,bus=JBHBE
# lspci -tv
-[0000:00]-+-00.0 Red Hat, Inc. QEMU PCIe Host bridge
+-01.0 Intel Corporation 82574L Gigabit Network Connection
+-02.0 Device 1234:1111
\-03.0-[01]----00.0 Intel Corporation 82576 Gigabit Network