Re: User mode drivers: part 2: PCI device handling (patch 1/2 for 2.6.11)

From: Jon Smirl
Date: Sat Mar 12 2005 - 17:54:08 EST

Here's a two year old patch for doing the same thing inside of UML but
it was never merged. The advantage to this scheme is that UML
implements the kernel. The same driver source code can be used inside
UML and the main kernel.

I modified UML so that it implemented all of the common calls drivers
need, like ioremap, request_irq, etc. The UML implementation of these
calls is a proxy for a device driver in the main kernel that actually
gets the DMA consistent memory, irq, etc. I was able to get DRM, fbdev
and USB all running unchanged inside UML with this patch. The entire
device driver is debugable with GDB.

I never solved the problem of UML crashing without acking a pending
interrupt. But now it seems that that problem does not exist on PCI

BTW, I found this to be a great way to debug drivers that don't need
real-time response to interrupts.

Jon Smirl

Attachment: vpci.tgz
Description: application/compressed-tar