[vbox-dev] host calling into vm for async I/O?
Sander van Leeuwen
Sander.Vanleeuwen at Sun.COM
Tue Jul 15 08:15:28 GMT 2008
Let me clarify this a bit more on the blocking case. Inside the guest
you need to create a (kernel) thread that calls the host HGCM service
and waits for an answer, which it will get when the host service detects
a directory change. As the host service is single threaded, you need to
create a separate thread that monitors for directory changes. That
additional host thread will asynchronously complete the HGCM service
call the guest makes.
This means the HGCM service call made by the guest is not completed
inside the svcCall handler (by calling g_pHelpers->pfnCallComplete).
Sander
Sander van Leeuwen wrote:
> There's is no such reversed callback mechanism for HGCM. You'd either
> have to poll or make a guest thread block in a wait for directory
> change HGCM call. The latter
> is not that easy as an HGCM client is single threaded.
>
> Sander
>
>
> Huihong Luo wrote:
>>
>> Are there any APIs that can invoke vm's functions from host (opposite
>> to VbglHGCMCall which does vm to host calls)?
>>
>> I am trying to implement directory change notification features on
>> windows shared folders. Basically, when files change in a host
>> folder, I want the host to invoke a callback function inside vm.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Huihong
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> vbox-dev mailing list
>> vbox-dev at virtualbox.org
>> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>>
>
>
> --
> Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet
>
> --
>
> Sun Microsystems GmbH Sander van Leeuwen
> Werkstrasse 24 Senior Staff Engineer, VirtualBox
> 71384 Weinstadt, Germany mailto:Sander.Vanleeuwen at sun.com
>
>
> ================================================
> Sitz der Gesellschaft: Sun Microsystems GmbH,
> Sonnenallee 1, 85551 Kirchheim-Heimstetten
> Amtsgericht Muenchen: HRB 161028
> Geschaeftsfuehrer: Thomas Schroeder,
> Wolfgang Engels, Dr. Roland Boehmer
> Vorsitzender des Aufsichtsrates: Martin Haering
> ================================================
> ------------------------------------------------------------------------
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>
--
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet
--
Sun Microsystems GmbH Sander van Leeuwen
Werkstrasse 24 Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:Sander.Vanleeuwen at sun.com
================================================
Sitz der Gesellschaft: Sun Microsystems GmbH,
Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder,
Wolfgang Engels, Dr. Roland Boehmer
Vorsitzender des Aufsichtsrates: Martin Haering
================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20080715/821286f1/attachment.html>
More information about the vbox-dev
mailing list