Assign the name "xdma-pcie" to the PCI bridge bus in xilinx_pcie_root_realize(). This makes it easier to identify the Xilinx PCIe host bridge in QEMU monitor commands (e.g., 'info qtree', 'info mtree') and debugging logs, distinguishing it from generic pci-bridge instances.
Signed-off-by: Chengbo Gao <[email protected]> --- hw/pci-host/xilinx-pcie.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c index 40f625b61d..2949c5385e 100644 --- a/hw/pci-host/xilinx-pcie.c +++ b/hw/pci-host/xilinx-pcie.c @@ -271,7 +271,9 @@ static void xilinx_pcie_root_realize(PCIDevice *pci_dev, Error **errp) { BusState *bus = qdev_get_parent_bus(DEVICE(pci_dev)); XilinxPCIEHost *s = XILINX_PCIE_HOST(bus->parent); + PCIBridge *br = PCI_BRIDGE(pci_dev); + br->bus_name = "xdma-pcie"; pci_set_word(pci_dev->config + PCI_COMMAND, PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); pci_set_word(pci_dev->config + PCI_MEMORY_BASE, s->mmio_base >> 16); -- 2.43.0
