Similar could be done by exposing a block of RAM as a PCIe endpoint.
To the host, it’d be already mapped as a BAR.