[Lguest] Forking Guest on lguest system.

Nezer Zaidenberg nzaidenberg at mac.com
Sun Jan 9 19:01:42 EST 2011


Hello,

We would like to add hypercall for forking the guest on lguest subsystem.
Our goal is to have two identical guests. (Our goal is to develop module for code coverage)

We added an hypercall to "fork-myself" (hypercall 20) and when we receive the hypercall (in the run_guest main loop) we exit to the launcher with a special return value.
upon receiving this return value we fork the launcher process and copy the lguest structure.

We are then able to continue running in the original process but not the child. 

Our child hangs when it printks. It never gets beyond the first notify hypercall.

Questions

1) When calling fork we replicate the guest process (including VM) but not the cloned do_thread processes with CLONE_VM.
We considered the process as stuck however, the do_thread process for IO (console output) is able to read data...
this puzzles us because the process was created with fork not clone so we don't understand why console_output is able to read from the child virtQ.
Does it make sense? can this be the reason we hang?

2) What is required from the virtQ so that the notify hypercall will complete? is it possible that we hang because the second notify is waiting on the virtQ on some condition that never occurs?

Any other ideas will be welcome

N



More information about the Lguest mailing list