Michael Litchard
2008-Jul-08 20:05 UTC
[Xen-devel] information needed for netbsd porting project
I would like to be able to do device driver development on a domU for devices that the domO doesn''t know about. Using the sources for 3.1.2, could someone tell me where to look to find the protocol between dom0 and domU used by Xen to do this? After that, I will need to implement the PCI front-end and back-end drivers. Could someone show me some sample code? Thanks Michael Litchard _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Lin.Yu@WindRiver.com
2008-Jul-09 13:53 UTC
Re: [Xen-devel] information needed for netbsd porting project
The_Definitive_Guide_to_the_Xen_Hypervisor, this book has a appendix chapter "PV Guest Porting Cheat Sheet" which is a recap. Additionally, the examples of this book maybe will be a good sample. On Wed, Jul 9, 2008 at 4:05 AM, Michael Litchard <michael@schmong.org> wrote:> I would like to be able to do device driver development on a domU for > devices that the domO doesn''t know about. > Using the sources for 3.1.2, could someone tell me where to look > to find the protocol between dom0 and domU used by Xen to do this? > > After that, I will need to implement the PCI front-end and back-end > drivers. > Could someone show me some sample code? > > > Thanks > > Michael Litchard > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- Best Regards, -- Lin.Yu _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Michael Litchard
2008-Jul-09 18:59 UTC
Re: [Xen-devel] information needed for netbsd porting project
excellent. I was moving toward buying that book. Now you''ve given me great reason. Putting in my order now. On 7/9/08, Lin.Yu@WindRiver.com <yulin724@gmail.com> wrote:> The_Definitive_Guide_to_the_Xen_Hypervisor, > this book has a appendix chapter "PV Guest Porting Cheat Sheet" which is a > recap. > Additionally, the examples of this book maybe will be a good sample. > > > On Wed, Jul 9, 2008 at 4:05 AM, Michael Litchard <michael@schmong.org> > wrote: > > > > I would like to be able to do device driver development on a domU for > > devices that the domO doesn''t know about. > > Using the sources for 3.1.2, could someone tell me where to look > > to find the protocol between dom0 and domU used by Xen to do this? > > > > After that, I will need to implement the PCI front-end and back-end > drivers. > > Could someone show me some sample code? > > > > > > Thanks > > > > Michael Litchard > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > > -- > Best Regards, > -- Lin.Yu >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2008-Jul-11 15:18 UTC
Re: [Xen-devel] information needed for netbsd porting project
> I would like to be able to do device driver development on a domU for > devices that the domO doesn''t know about. > Using the sources for 3.1.2, could someone tell me where to look > to find the protocol between dom0 and domU used by Xen to do this? > > After that, I will need to implement the PCI front-end and back-end > drivers. Could someone show me some sample code?Take a look in the XenLinux tree, drivers/xen/pci{front,back} and in the Xen hypervisor tree, xen/include/public/io/pciif.h You may also want to look in the tools/ directory in the hypervisor tree to see how devices get assigned to a guest in the firstplace. Most PCI IO can be done directly by a guest once the PCI passthrough is done. Config space changes still need to go through dom0, though. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Michael Litchard
2008-Jul-11 23:07 UTC
Re: [Xen-devel] information needed for netbsd porting project
On 7/11/08, Mark Williamson <mark.williamson@cl.cam.ac.uk> wrote:> > I would like to be able to do device driver development on a domU for > > devices that the domO doesn''t know about. > > Using the sources for 3.1.2, could someone tell me where to look > > to find the protocol between dom0 and domU used by Xen to do this? > > > > After that, I will need to implement the PCI front-end and back-end > > drivers. Could someone show me some sample code? > > > Take a look in the XenLinux tree, drivers/xen/pci{front,back} and in the Xen > hypervisor tree, xen/include/public/io/pciif.h > > You may also want to look in the tools/ directory in the hypervisor tree to > see how devices get assigned to a guest in the firstplace.Am I looking in the right place? /usr/local/src/xen-3.1.4/xen/tools _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2008-Jul-13 17:22 UTC
Re: [Xen-devel] information needed for netbsd porting project
> > Take a look in the XenLinux tree, drivers/xen/pci{front,back} and in the > > Xen hypervisor tree, xen/include/public/io/pciif.h > > > > You may also want to look in the tools/ directory in the hypervisor tree > > to see how devices get assigned to a guest in the firstplace. > > Am I looking in the right place? > /usr/local/src/xen-3.1.4/xen/toolsYes, that''s about right. Some relevant places to start would be to look at: tools/python/xen/xend/XendDevices.py tools/python/xen/xend/server/pciif.py tools/libxc/xc_domain.c (for the hypercalls to enable PCI access) and to follow files that call these / that these include or import. Hope that helps a bit. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel