hw/cxl: Add a switch mailbox CCI function
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Oct 2023 16:07:55 +0000 (17:07 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Nov 2023 08:39:11 +0000 (03:39 -0500)
commit4a58330343e6a16f6828e225fd0c054c8d1916bd
tree1599e80f9e433c78b55eef06240dd9720b718946
parent2710d49a7c8b9b117a46847c7ace5eb21d48e882
hw/cxl: Add a switch mailbox CCI function

CXL switch CCIs were added in CXL r3.0. They are a PCI function,
identified by class code that provides a CXL mailbox (identical
to that previously defined for CXL type 3 memory devices) over which
various FM-API commands may be used. Whilst the intent of this
feature is enable switch control from a BMC attached to a switch
upstream port, it is also useful to allow emulation of this feature
on the upstream port connected to a host using the CXL devices as
this greatly simplifies testing.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20231023160806.13206-7-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-device-utils.c
hw/cxl/cxl-mailbox-utils.c
hw/cxl/meson.build
hw/cxl/switch-mailbox-cci.c [new file with mode: 0644]
include/hw/cxl/cxl_component.h
include/hw/cxl/cxl_device.h
include/hw/pci-bridge/cxl_upstream_port.h