Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-09 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Dec 07, 2022 at 07:25:49AM +0100, Markus Armbruster wrote: >> pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. >> pci.h must be included before pcie_sriov.h or else compile fails. >> >> Adding #include "pci/pci.h" to pcie_sriov would b

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Michael S. Tsirkin
On Wed, Dec 07, 2022 at 10:02:53AM +0100, Philippe Mathieu-Daudé wrote: > On 7/12/22 07:25, Markus Armbruster wrote: > > pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. > > pci.h must be included before pcie_sriov.h or else compile fails. > > > > Adding #include "pci/pci.h"

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Michael S. Tsirkin
On Wed, Dec 07, 2022 at 07:25:49AM +0100, Markus Armbruster wrote: > pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. > pci.h must be included before pcie_sriov.h or else compile fails. > > Adding #include "pci/pci.h" to pcie_sriov would be wrong, because it > would close an

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Philippe Mathieu-Daudé
On 7/12/22 07:25, Markus Armbruster wrote: pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. pci.h must be included before pcie_sriov.h or else compile fails. Adding #include "pci/pci.h" to pcie_sriov would be wrong, because it would close an inclusion loop: pci.h includes p

How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-06 Thread Markus Armbruster
pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. pci.h must be included before pcie_sriov.h or else compile fails. Adding #include "pci/pci.h" to pcie_sriov would be wrong, because it would close an inclusion loop: pci.h includes pcie.h (for PCIExpressDevice) includes pcie_sr