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

Hans de Goede hdegoede at redhat.com
Mon Jul 10 10:29:05 GMT 2017


Hi,

On 10-07-17 12:08, Hans de Goede wrote:
> 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.

Ok, that version was no good, I did not notice that
some of the removed code was responsible for
calling vbglR0HGCMInit(), here is a new version
replacing the VbglR0SfInit call with vbglR0HGCMInit.

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: 6371 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20170710/321fe7ad/attachment.bin>


More information about the vbox-dev mailing list