[vbox-dev] Opportunity to significantly shrink the vboxsf Linux driver
michael.thayer at oracle.com
Tue Jul 11 14:01:37 UTC 2017
Hello Larry and Hans,
11.07.2017 11:53, Hans de Goede wrote:
> Hi Larry,
> On 10-07-17 21:37, Larry Finger wrote:
[Discussion of a patch to the shared folder driver.]
>> I tried your patch. The first problem was that the first file to be
>> patched is HGCM.cpp, not HGCM.c. That was easily fixed.
>> The second problem is that when I try to load vboxsf.ko in a guest, I
>> get a message that vbg_host_version is an unknown symbol.
> Correct, my patch was intended to give an idea how the vboxsf driver
> could be made smaller, not as a ready to use patch.
The patch was against the source files used to build the module it seems
to me, which are renamed versions of various files in our tree. I have
not yet tried applying it, as I have been spending a bit of time reading
it and code areas it would affect first. Now I am more optimistic that
it could be applied without affecting other guests (I forgot to mention
Haiku, FreeBSD and OS/2 in the supported list), and a colleague who know
the Windows Additions well also thought it might.
> Just like I did with the vboxvideo driver I'm currently working on
> cleaning up the vboxguest driver for upstream submission. Since
> this requires some major surgery I'm not feeding back those changes
> to VirtualBox svn. This specific change looks like it can be adapted
> to upstream with a little effort which is why I send it to the list.
As I said, at least the waitqueue change should be transferable if IPRT
event semaphores are used, and I presume many of the other changes will
be. I will look at it if I ever find the time. I wonder if it would
make sense to structure your changes in a way which separates structural
changes and IPRT to kernel API switches? Not had time to look through
your changes, perhaps you are already doing that.
> If you're curious about my vboxguest efforts you can find them
> here (very much WIP):
> I've already replaced a bunch of VirtualBox custom malloc functions
> with regular kernel ones and the same for spinlocks and wait_queues.
> I still need to replace the VirtualBox custom malloc functions
> for the memory baloon and for vgdrvInitFixateGuestMappings() once
> that is done the code will be more or less free of relying on
> a lot of the VirtualBox portability / runtime code and I should
> be able to remove most of the code, leaving just 3 .c files and
> a bunch of headers.
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
More information about the vbox-dev