本文将记录PCIe中PRI(Page Request Interface)相关知识点。

阅读本文前,读者需要对ATSguest memory pinning when direct assignment of I/O devices有一定的了解。

PRI(Page Request Interface) allows functions(BDF中的F) to raise page faults to the IOMMU.

1. DMA Page Fault Support

Description from PCIe spec:

Description from ASPLOS ’17 paper:

2. Page Request Services

The general model for a page request is as follows:

  1. A Function determines that it requires access to a page for which an ATS translation is not available.
  2. The Function causes the associated Page Request Interface to send a Page Request Message to its RC. A Page Request Message contains a page address and a Page Request Group (PRG) index. The PRG index is used to identify the transaction and is used to match requests with responses.
  3. When the RC determines its response to the request (which will typically be to make the requested page resident), it sends a PRG Response Message back to the requesting Function.
  4. The Function can then employ ATS to request a translation for the requested page(s).

3. Implementation


参考资料:

  1. Address Translation Services Revision 1.1
  2. Shared Virtual Memory in KVM
  3. Page Fault Support for Network Controllers, ASPLOS ’17