qemu-e2k/hw/cxl
Jonathan Cameron 004e3a93b8 hw/cxl: Add tunneled command support to mailbox for switch cci.
This implementation of tunneling makes the choice that our Type 3 device is
a Logical Device (LD) of a Multi-Logical Device (MLD) that just happens to
only have one LD for now.

Tunneling is supported from a Switch Mailbox CCI (and shortly via MCTP over
I2C connected to the switch MCTP CCI) via an outer level to the FM owned LD
in the MLD Type 3 device. From there an inner tunnel may be used to access
particular LDs.

Protocol wise, the following is what happens in a real system but we
don't emulate the transports - just the destinations and the payloads.

( Host -> Switch Mailbox CCI - in band FM-API mailbox command
  or
  Host -> Switch MCTP CCI - MCTP over I2C using the CXL FM-API
  MCTP Binding.
)
then (if a tunnel command)
Switch -> Type 3 FM Owned LD - MCTP over PCI VDM using the
CXL FM-API binding (addressed by switch port)
then (if unwrapped command also a tunnel command)
Type 3 FM Owned LD to LD0 via internal transport
(addressed by LD number)

or (added shortly)

Host to Type 3 FM Owned MCTP CCI - MCTP over I2C using the
CXL FM-API MCTP Binding.
then (if unwrapped comand is a tunnel comamnd)
Type 3 FM Owned LD to LD0 via internal transport.
(addressed by LD number)

It is worth noting that the tunneling commands over PCI VDM
presumably use the appropriate MCTP binding depending on opcode.
This may be the CXL FMAPI binding or the CXL Memory Device Binding.

Additional commands will need to be added to make this
useful beyond testing the tunneling works.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Message-Id: <20231023160806.13206-18-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-11-07 03:39:11 -05:00
..
cxl-cdat.c hw/cxl: Line length reductions 2023-11-07 03:39:11 -05:00
cxl-component-utils.c hw/cxl: Fix a QEMU_BUILD_BUG_ON() in switch statement scope issue. 2023-11-07 03:39:11 -05:00
cxl-device-utils.c hw/cxl/mbox: Wire up interrupts for background completion 2023-11-07 03:39:11 -05:00
cxl-events.c hw/cxl/mbox: Split mailbox command payload into separate input and output 2023-11-07 03:39:11 -05:00
cxl-host-stubs.c pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup. 2022-06-09 19:32:49 -04:00
cxl-host.c hw/cxl: Support 4 HDM decoders at all levels of topology 2023-10-04 18:15:06 -04:00
cxl-mailbox-utils.c hw/cxl: Add tunneled command support to mailbox for switch cci. 2023-11-07 03:39:11 -05:00
Kconfig hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5) 2022-05-13 06:13:35 -04:00
meson.build hw/cxl: Add a switch mailbox CCI function 2023-11-07 03:39:11 -05:00
switch-mailbox-cci.c hw/cxl: Add a switch mailbox CCI function 2023-11-07 03:39:11 -05:00