On 03/08/14 01:47, Perry E. Metzger wrote:
> On Wed, 30 Jul 2014 13:05:05 +0000 Antti Kantee <[email protected]> wrote:
>> p.s. this mail wasn't about USB or release script fixes, not 100%
>> sure what the subject really is or if I'm talking completely
>> out-of-topic ...
>
> You actually were on topic. One thing I noted earlier was that thanks
> to Rump, it should be possible for Minix to use NetBSD's USB drivers.
> The topic expanded from there.

Ah, I was under the impression that Minix already had USB drivers.

I skimmed through the thread.  Just to reiterate what was essentially 
already said: it's possible to run PCI drivers in rump kernels.  I've 
tested them on Xen (with pci-passthrough) and in Linux userspace (with 
uio_pci_generic).  Support on any host where it's possible to export PCI 
access to a guest is not very many lines of code.  The interfaces you 
need for PCI support are accessing the PCI config space, establishing 
interrupts and dealing with DMA-safe memory:
http://nxr.netbsd.org/xref/src/sys/rump/dev/lib/libpci/pci_user.h
(it's a bit of "work in progress" in many ways, so if someone has 
suggestions and patches, I'm all ears)

Originally (>5 years ago) indeed USB drivers were supported so that the 
host controller and part of the USB stack ran on the host NetBSD kernel, 
while the device part along with its dependencies (e.g. SCSI stack for 
USB memory sticks) ran in a rump kernel in userspace.  The advantage of 
that approach was that all of the privileged code exited in a single 
server (which happened to be the NetBSD kernel).  The disadvantage was 
that the amount of privileged code was quite high.  With NetBSD being a 
monolithic OS, trusting a whole lot of complex code in the kernel to 
work properly when you throw atypical errors at it wasn't the full 
ticket to safe USB drivers.  Plus, the "virtualized host controller" is 
quite big (>1k lines) and contains a few not-so-obvious kludges.

Not sure if the split approach would make sense for Minix.  I guess you 
could easily make the hardware half reasonably safe and restartable. 
(just thinking out loud, apologies if stepping onto something that has 
already been carefully considered in the Minix community)

   - antti

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to