Peer-to-peer memory access request for memory devices
A memory access request is initiated by a first peripheral device. The memory access request includes a virtual address. A host physical address (HPA) associated with the virtual address is determined. An identifier of a base address register (BAR) associated with the HPA is determined by the first peripheral device. The memory access request is transmitted using the identifier of the BAR to a second peripheral device.
1 . A system comprising:
a plurality of memory devices; and
a processing device, operatively coupled with the plurality of memory devices, to perform operations comprising:
initiating, by a first peripheral device, a memory access request, wherein the memory access request includes a virtual address;
determining, by the first peripheral device, a host physical address (HPA) associated with the virtual address;
determining, by the first peripheral device, an identifier of a base address register (BAR) associated with the HPA; and
transmitting the memory access request specifying the identifier of the BAR to a second peripheral device.
2 . The system of claim 1 , wherein determining, by the first peripheral device, the HPA associated with the virtual address comprises:
generating a translation request, wherein the translation request specifies the virtual address of the memory access request to be translated;
transmitting, to a host system, the translation request; and
receiving, from the host system, a translation response, wherein the translation response includes the HPA.
3 . The system of claim 1 , wherein determining, by the first peripheral device, the HPA associated with the virtual address comprises obtaining for an address translation cache the HPA associated with the virtual address.
4 . The system of claim 1 , wherein the first peripheral device, the second peripheral device, and a host system are connected via a Compute Express Link (CXL) link.
5 . The system of claim 1 , wherein determining, by the first peripheral device, the identifier of the BAR associated with the HPA comprises:
determining whether the HPA is a physical address of a host system or the first peripheral device;
responsive to determining that the HPA is not a physical address of the host system or the first peripheral device, identifying a preconfigured translation data structure, wherein the preconfigured translation data structure includes mappings between HPAs and the identifiers of the BAR of the host system, first peripheral device, and second peripheral device;
querying, using the HPA, the preconfigured translation data structure for the identifier of the BAR; and
returning the identifier of the BAR.
6 . The system of claim 1 , wherein the memory access request is transmitted to the second peripheral device via a CXL.io interface.
7 . The system of claim 1 , wherein the processing device is to perform operations further comprising:
receiving, by the first peripheral device, a response from the second peripheral device via CXL.io interface, wherein the response indicates a status and outcome of the memory access request processed on the second peripheral device.
8 . A method comprising:
initiating, by a first peripheral device, a memory access request, wherein the memory access request includes a virtual address;
determining, by the first peripheral device, a host physical address (HPA) associated with the virtual address;
determining, by the first peripheral device, an identifier of a base address register (BAR) associated with the HPA; and
transmitting, using the identifier of the BAR, the memory access request specifying the identifier of the BAR to a second peripheral device.
9 . The method of claim 8 , wherein determining, by the first peripheral device, the HPA associated with the virtual address comprises:
generating a translation request, wherein the translation request specifies the virtual address of the memory access request to be translated;
transmitting, to a host system, the translation request; and
receiving, from the host system, a translation response, wherein the translation response includes the HPA.
10 . The method of claim 8 , wherein determining, by the first peripheral device, the HPA associated with the virtual address comprises obtaining for an address translation cache the HPA associated with the virtual address.
11 . The method of claim 8 , wherein the first peripheral device, the second peripheral device, and a host system are connected via a Compute Express Link (CXL).
12 . The method of claim 8 , wherein determining, by the first peripheral device, the identifier of the BAR associated with the HPA comprises:
determining whether the HPA is a physical address of a host system or the first peripheral device;
responsive to determining that the HPA is not a physical address of the host system or the first peripheral device, identifying a preconfigured translation data structure, wherein the preconfigured translation data structure includes mappings between HPAs and the identifiers of the BAR of the host system, first peripheral device, and second peripheral device;
querying, using the HPA, the preconfigured translation data structure for the identifier of the BAR; and
returning the identifier of the BAR.
13 . The method of claim 8 , wherein the memory access request is transmitted to the second peripheral device via a CXL.io interface.
14 . The method of claim 8 , further comprising:
receiving, by the first peripheral device, a response from the second peripheral device via CXL.io interface, wherein the response indicates a status and outcome of the memory access request processed on the second peripheral device.
15 . A non-transitory computer-readable storage medium comprising instructions that, when executed by a processing device, cause the processing device to perform operations comprising:
initiating, by a first peripheral device, a memory access request, wherein the memory access request includes a virtual address;
determining, by the first peripheral device, a host physical address (HPA) associated with the virtual address;
determining, by the first peripheral device, an identifier of a base address register (BAR) associated with the HPA; and
transmitting, using the identifier of the BAR, the memory access request to a second peripheral device.
16 . The non-transitory computer-readable storage medium of claim 15 , wherein determining, by the first peripheral device, a host physical address (HPA) associated with the virtual address comprises:
generating a translation request, wherein the translation request specifies the virtual address of the memory access request to be translated;
transmitting, to a host system, the translation request; and
receiving, from the host system, a translation response, wherein the translation response includes the HPA.
17 . The non-transitory computer-readable storage medium of claim 15 , wherein the second peripheral device includes at least one attached memory device.
18 . The non-transitory computer-readable storage medium of claim 15 , wherein the first peripheral device, the second peripheral device, and a host system are connected via a Compute Express Link (CXL) link.
19 . The non-transitory computer-readable storage medium of claim 15 , wherein determining, by the first peripheral device, the identifier of the BAR associated with the HPA comprises:
determining whether the HPA is a physical address of a host system or the first peripheral device;
responsive to determining that the HPA is not a physical address of the host system or the first peripheral device, identifying a preconfigured translation data structure, wherein the preconfigured translation data structure includes mappings between HPAs and the identifiers of the BAR of the host system, first peripheral device, and second peripheral device;
querying, using the HPA, the preconfigured translation data structure for the identifier of the BAR; and
returning the identifier of the BAR.
20 . The non-transitory computer-readable storage medium of claim 15 , wherein the memory access request is transmitted to the second peripheral device via a CXL.io interface.