OSDN Git Service

hw/cxl/rp: Add a root port
authorBen Widawsky <ben.widawsky@intel.com>
Fri, 29 Apr 2022 14:40:41 +0000 (15:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 13 May 2022 10:13:36 +0000 (06:13 -0400)
commitd86d30192b7bc5a10fa6c82c073f55aea25f9291
tree4c7c65ccabf4eda78e0f323636edbe30243746b8
parent33c47ab967558dfb02b3439b37e7dcfcdced0157
hw/cxl/rp: Add a root port

This adds just enough of a root port implementation to be able to
enumerate root ports (creating the required DVSEC entries). What's not
here yet is the MMIO nor the ability to write some of the DVSEC entries.

This can be added with the qemu commandline by adding a rootport to a
specific CXL host bridge. For example:
  -device cxl-rp,id=rp0,bus="cxl.0",addr=0.0,chassis=4

Like the host bridge patch, the ACPI tables aren't generated at this
point and so system software cannot use it.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220429144110.25167-17-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/Kconfig
hw/pci-bridge/cxl_root_port.c [new file with mode: 0644]
hw/pci-bridge/meson.build
hw/pci-bridge/pcie_root_port.c
hw/pci/pci.c