On Wed, May 18, 2005 at 09:24:07AM -0400, Young Koh wrote: > Thanks for the replies. let me understand them. In a SKAS mode UML > kernel, the pseudo code of a system call invocation would be like the > following. > > wait4(); // wait until a user process raises a syscall > save_registers(); // copy the user process' registers to UML kernel space > execute_syscall(); // execute the syscall in UML kernel context > restore_registers(); // copy the user registers back to the user process
Correct. > but, during execute_syscall(), even if its stubs use all the registers > and/or it happens to invoke switch_to(), it will happen all in the UML > kernel's context. that means the user process's context will be > protected by host kernel's context switching mechanism. doesn't it? > because the host kernel will automatically save/restore a process' > registers when the process is stopped and resumed, all we care about > in the above routine should be to get system call parameters from the > tracee and save the return value to it. shouldn't it? (again, only for > SKAS) No, because (in skas mode) there is only one host process for all the UML processes. So the process registers have to be saved and restored across a context switch. Jeff ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel