pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup.
commit7bd1900b365b5e7ae498cf9c915867fcaa5296fc
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 8 Jun 2022 14:54:37 +0000 (8 15:54 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 9 Jun 2022 23:32:49 +0000 (9 19:32 -0400)
tree0363346827bc657e5514013790fd3c299ff13220
parent96f7da1711348758f9919ffdfe1e984012ef7acd
pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup.

As the CXLState will no long be accessible via MachineState
at time of PXB_CXL realization, come back later from the machine specific
code to fill in the missing memory region setup. Only at this stage
is it possible to check if cxl=on, so that check is moved to this
later point.

Note that for multiple host bridges, the allocation order of the
register spaces is changed. This will be reflected in ACPI CEDT.

Stubs are added to handle case of CONFIG_PXB=n for machines that
call these functions.

The bus walking logic is common to all machines so add a utility
function + stub to cxl-host*.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-6-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-host-stubs.c
hw/cxl/cxl-host.c
hw/i386/pc.c
hw/pci-bridge/meson.build
hw/pci-bridge/pci_expander_bridge.c
hw/pci-bridge/pci_expander_bridge_stubs.c [new file with mode: 0644]
include/hw/cxl/cxl_host.h
include/hw/pci-bridge/pci_expander_bridge.h [new file with mode: 0644]