Date: Mon, 9 Jul 2018 17:09:43 +0530 From: Pratyush Yadav <pratyush@freebsd.org> To: soc-status@freebsd.org Cc: Akshay Jaggi <jaggi@freebsd.org>, Edward Napierala <trasz@freebsd.org> Subject: [Week 8] Import the Xen grant-table bus_dma(9) handlers from OpenBSD Message-ID: <CA%2BX=3TLrJHU2T6q0wfbhR1F7QgNu-VWzHyxNeGuoZ=1buzBgTg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, Last week I went through the Xen blkfront driver code to understand how it works, and how it uses the grant references. It took me quite some time because the driver is huge and I was often chasing functions all over the place. After that, I started to convert the blkfront driver to use the new busdma implementation. There are two places where foreign access is granted: - xbd_connect() (blkfront.c:1341). Here, access is granted to the xbd's indirect pages. - xbd_mksegarray() (blkfront.c:162). This is called from the dma load callback to the loads in xbd_queue_request() (blkfront.c:301). xbd_connect() seems simpler so I started with it. I have managed to update xbd_connect() to use the new busdma implementation, and now I will start to update xbd_mksegarray(). I also made further improvements to the busdma implementation, like the ability to pass flags to the grant table allocation methods, and improved error checking. Also, I fixed an infinite recursion bug. You can check the code here [0]. I maintain a blog on Blogger where I publish my progress every few days. Check it out if you want more details on what I'm doing [1]. [0] https://github.com/prati0100/freebsd/tree/busdma_xen_clean [1] https://pratyushgsoc.blogspot.com/ -- Regards, Pratyush Yadav
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BX=3TLrJHU2T6q0wfbhR1F7QgNu-VWzHyxNeGuoZ=1buzBgTg>