Import the Xen grant-table bus_dma(9) handlers from OpenBSD

Project description

Xen uses the grant table interface to grant foreign domains access to page frames and to do ownership transfer. Each domain maintains its own grant table and it shares that with Xen to tell it what permissions other domains have on its pages. The index of a grant table entry, called a grant reference, is transmitted to the other domains that need to access the page. OpenBSD’s implementation uses wrappers for the bus_dma(9) interface to implement custom bus_dma functions for communication between domains. This project will bring in the grant table handlers from OpenBSD and integrate them with the rest of the system.

Approach to solving the problem

First, I will take a look at OpenBSD's implementation of the Xen drivers. I will understand where and how the bus_dma(9) interface is used. Then I will identify where that interface would fit in FreeBSD's implementation.

Then comes the importing part. Once the importing is partially completed, some testing will need to be done. After that, complete the implementation and test thoroughly.


Progress Blog

I maintain a progress blog on Blogger which I update nearly every day with what I did that day. Take a look at: Google Summer of Code Progress Blog

The Code


My GitHub fork:

For the entire patch so far, with the all the commits squashed (I update this less often):

Individual Commits (Some of these commits are not finalized as of yet, I will update the links when I over-write them. For the most latest work, check the above branches)

Work Done So Far

Work Left

Bugs I spotted while working on the project

SummerOfCode2018Projects/ImportXenbus_dmaFromOpenBSD (last edited 2018-12-14T13:59:18+0000 by PratyushYadav)