nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
162 stars 51 forks source link

Add support for emulating CXL devices #736

Open sbates130272 opened 1 year ago

sbates130272 commented 1 year ago

CXL is based off PCIe such that one of the CXL modes (CXL.io) is effectively PCIe TLPs transported over CXL flits. I think is should be possible to add CXL device emulation support to libvfio-user and to add similar support in client applications like QEMU. This would allow us to quickly develop and experiment with all sorts of virtual CXL devices.

Note that QEMU does already have native support for some types of CXL devices but adding support to libvfio-user would allow us to add other types of devices with polluting the upstream QEMU.

tmakatos commented 1 year ago

I don't know anything about CXL, probably @jlevon knows more. Assuming support for CXL doesn't interfere with standard PCIe emulation then I don't see why we wouldn't take it. @sbates130272 are you planning to take a stab at it?

sbates130272 commented 1 year ago

Ha @tmakatos I will wait for @jlevon and others to comment on this. I am pretty sure this can be done in a way that does not interfere with PCIe emulation but it is not clear to me how easy (or hard) this will be to implement.

jlevon commented 1 year ago

This would be great, for sure, but it's nothing something we (Nutanix) are planning on working on any time soon. We take PRs ;)