Re: [vbox-dev] host calling into vm for async I/O?

2008-07-15 Thread Huihong Luo
Sander,
 
Thanks, I understand it. For each vm system thread that waits for directory 
change 
events, we can launch a host thread. 
 
Another way is not to use the vbox mechanism, instead, using tcp/ip 
communication between host and vm, but this won't work if networking is 
disabled. This is how the current windows sharing (samba) are implemented.
 
Huihong

--- On Tue, 7/15/08, Sander van Leeuwen <[EMAIL PROTECTED]> wrote:

From: Sander van Leeuwen <[EMAIL PROTECTED]>
Subject: Re: [vbox-dev] host calling into vm for async I/O?
To: "VirtualBox developer's list" 
Cc: [EMAIL PROTECTED]
Date: Tuesday, July 15, 2008, 1:15 AM


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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
  

-- 
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet

--

Sun Microsystems GmbHSander van Leeuwen
Werkstrasse 24   Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[EMAIL PROTECTED]



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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
  

-- 
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet

--

Sun Microsystems GmbHSander van Leeuwen
Werkstrasse 24   Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[EMAIL PROTECTED]



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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] host calling into vm for async I/O?

2008-07-15 Thread Sander van Leeuwen
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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
  



--
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet

--

Sun Microsystems GmbHSander van Leeuwen
Werkstrasse 24   Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[EMAIL PROTECTED]



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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
  



--
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet

--

Sun Microsystems GmbHSander van Leeuwen
Werkstrasse 24   Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[EMAIL PROTECTED]



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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] host calling into vm for async I/O?

2008-07-15 Thread Sander van Leeuwen
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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
  



--
Kind regards / Mit freundlichen Gruessen / Met vriendelijke groet

--

Sun Microsystems GmbHSander van Leeuwen
Werkstrasse 24   Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[EMAIL PROTECTED]



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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


[vbox-dev] host calling into vm for async I/O?

2008-07-15 Thread Huihong Luo
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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev