[vbox-dev] Linux PCI-passthrough kernel module cleanup

Anton Yakovlev a.h.yakovlev at gmail.com
Tue Sep 5 05:40:57 GMT 2017


Hi Michael,

Well, basically, I'm running WIndows 10 guest and have a few USB devices
(professional audio card + web cams), which do not work in the guest at all
(though they appear in Windows and have correct setup). Since other USB
devices work fine (like USB mass storage), I was wondered why it so. Brief
investigation on VBox sources showed, that it seems, that VBox uses
USBFS-based interface for backend on Linux host. In general case, it does
not suit for real-time data (like audio/video streams). In such case it's
better to have a Linux kernel driver, which handles all actual URB traffic,
and backend make direct calls to that driver (like vhost-based drivers do).
As I can understand, VBox allows to make direct call to kernel modules
through COM-interfaces. That's why I decided to play with it and replace
current implementation of Linux USBProxyDevice implementation. :)


Best regards,
Anton


On Mon, Sep 4, 2017 at 10:00 PM, Michael Thayer <michael.thayer at oracle.com>
wrote:

> Hello Anton,
>
> Short answer due to lack of time and lack of familiarity with that
> particular driver, but I don't know if anyone else currently on the team
> would do better.  Playing with "svn blame" and "svn diff" shows that the
> function was introduced in r36260 but never actually used.  It happens.
> I am interested in what sort of support driver you are wanting to write,
> if that is something you feel like telling.  We call the main
> virtualisation driver the "support driver", but I presume that is not
> what you meant.  Knowing might help us help you, though as everyone is
> rather short on time, reading sources like you are doing is a good idea.
>
> Regards
> Michael
>
> 02.09.2017 16:38, Anton Yakovlev wrote:
> > Hi all,
> >
> > I'm gonna implement my own Linux kernel module for VBox support driver
> > and took PCI-passthrough module as a base example. And I have some
> > uncertainty. There're two functions for creating/destroying "instance"
> > structures (vboxPciNewInstance/vboxPciUnlinkInstanceLocked). I can
> > easily find, where vboxPciNewInstance is invoked. But
> > vboxPciUnlinkInstanceLocked is called only from vboxPciDevCleanup. I
> > grep'ed the whole VBox source code tree, and there's no place, where the
> > last function is called. I don't know, is it some kind of a bug or this
> > function is invoked in some unobvious way?
> >
> > I work with SVN revision 67803M.
> >
> > Best regards,
> > Anton--
> Michael Thayer | VirtualBox engineer
> ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstraße 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
> der Handelskammer Midden-Nederland, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20170905/b135d348/attachment.html>


More information about the vbox-dev mailing list