Add a chassis_nr property instead of using PXB bus number
as internal bridge's chassis nr.
Suggested-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
v3->v4:
- re-coded to fit current codebase
v2->v3:
- use bus nr if chassis nr is 0 (Micahel S. Tsirkin)
v1->v2:
- Rebased on master
docs/pci_expander_bridge.txt | 7 +++----
hw/pci-bridge/pci_expander_bridge.c | 21 +++++++++++++++++++--
2 files changed, 22 insertions(+), 6 deletions(-)
DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
+ /* Note: 0 is not a legal chassis number. */
+ DEFINE_PROP_UINT8("chassis_nr", PXBDev, chassis_nr, 0),
DEFINE_PROP_END_OF_LIST(),
};
@@ -322,6 +332,13 @@ static int pxb_pcie_dev_initfn(PCIDevice *dev)
return pxb_dev_init_common(dev, true);
}
+static Property pxb_pcie_dev_properties[] = {
+ /* Note: 0 is not a legal a PXB bus number. */
+ DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
+ DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
+ DEFINE_PROP_END_OF_LIST(),
+};