Introduction to PCIe Page Request Interface
本文将记录PCIe中PRI(Page Request Interface)相关知识点。
阅读本文前,读者需要对ATS和guest 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:
- A Function determines that it requires access to a page for which an ATS translation is not available.
- 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.
- 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.
- The Function can then employ ATS to request a translation for the requested page(s).
3. Implementation
参考资料:
- Address Translation Services Revision 1.1
- Shared Virtual Memory in KVM
- Page Fault Support for Network Controllers, ASPLOS ’17