[vbox-dev] Opportunity to significantly shrink the vboxsf Linux driver

Hans de Goede hdegoede at redhat.com
Mon Jul 10 10:08:57 GMT 2017


Hi all,

During my vboxguest Linux cleanup work I made a small
detour to the vboxsf driver.

I noticed that although it depends on vboxguest to make
hgcm calls, it still comes with its own copy of
GenericRequest, Physheap, Init and VMMDev.c

It seems the only reason it uses this is to get
g_vbgldata.hostVersion so that it can check for
page-list support.

IMHO it would be better if the vboxguest driver were
to store the hostVersion in an exported global
variable, say vbg_host_version. And then
vboxfs would use that. Combine that with moving:

RTSEMFASTMUTEX mutexHGCMHandle;
struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];

 From g_vbgldata to static globals in HGCM.c
and then g_vbgldata can be dropped from
VBGLInternal.h together with dropping
GenericRequest, Physheap, Init and VMMDev.c
completely.

I've attached a patch which does this from my
own local vboxsf version.

I think that it should be easy to adopt this
patch for upstream.

Regards,

Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Stop-calling-VbglGRPerform-ourselves-just-to-get-the.patch
Type: text/x-patch
Size: 6077 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20170710/8040fa57/attachment.bin>


More information about the vbox-dev mailing list