I've been working for the last few weeks making a
virtual PCI bus inside of UML. My goal for this is to
"export" physical hardware in the host machine into
the UML, but it could also be used with emulated
devices. I have the initial implementation finished
My first pass makes drivers/pci work inside UML. Other
modules can now call into the PCI subsystem and get
hardware info. Things like /proc/bus/pci and /proc/pci
also work. I am initially populating the bus with all
of the external hardware. Later I want to use the UML
command line to control what devices are exported.
The future goal is to allow development work on
framebuffer drivers which are a real pain to work on.
You could also use this for working on sound/disk
drivers etc. In the next phase I have to figure out
how to fake DMA and AGP.
Right now the code is 2.5 dependent because I needed
to make changes to drivers/pci. drivers/pci mixed up
all of the code that creates the data structures with
the code that fills them in. I had to split these
since my UML code uses a different mechanism to fill
them. There is no reason the same changes couldn't be
made in 2.4.
I'm attaching the patches against the current 2.5
tree. Please let me know if I generated these
correctly since I'm a bk newbie. With this patch
applied you should see all of your hardware in
/proc/pci and /proc/bus/pci.
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.