On Fri, 24 Jun 2022 16:01:42 +0100 Peter Maydell <peter.mayd...@linaro.org> wrote:
> On Fri, 24 Jun 2022 at 15:54, Jonathan Cameron > <jonathan.came...@huawei.com> wrote: > > Just occurred to me there is another barrier to an approach that adds > > DT bindings. > > I fairly sure hw/pci-bridge/pci_expander_bridge.c (PXB) > > only works on ACPI platforms and is the only host bridge supported > > for CXL emulation in QEMU. > > Isn't it probeable like any other PCI device/bridge ? Nope - PXB is a really weird device. (I tested it quickly in case I was wrong and indeed, no sign of device on the downstream side without a suitable BIOS / ACPI) There is no driver support for it as such, rather it presents as two things. 1) A EP on the main host bridge - which is used for interrupt routing and possibly a few other things. Linux has no idea that's what it is though so attaches no driver to it. lspci shows this as Red Hat, Inc, QEMU PCIe Expander Bridge 2) A host bridge with firmware described characteristics (bus number range and similar). Host bridges as defined in ACPI are a concept rather than actual hardware and presented to the OS via firmware descriptions (ACPI DSDT stuff in this case). You could probably add dt description via pci-host-ecam-generic bindings though but it would be an interesting late bit of dt addition in the virt_machine_done() function. Similar to the fw_cfg and ACPI stuff done at that stage to deal with PXB devices becoming visible. So gut feeling is PXB could be made to work with DT, but doesn't today. Give the main usecase for PXB is typically NUMA description I guess no one noticed on DT platforms. Jonathan > > -- PMM