I was wondering how a system call is treated when used in a virtual machine. Does it send some kind of signal through the virtualizing kernel and then to the “real” kernel (of the physical machine)?
I googled the subject but I can’t seem to find anything. Thank you in advance.
In a virtual machine, where all hardware is virtualized, it works just like it would on real hardware. It goes through whatever syscall instructions the architecture has, which are read by the hypervisor, which executes the instructions on it’s virtual processor.
However, in a emulation layer like Wine, syscalls in the PE executables are mapped to syscalls on the Linux kernel APIs.