Hi Maryam, The code that you are looking at is going to change soon. There is a changeset on the google reviewboard which will add some fidelity to the tracing of mmap/munmaps from the perspective of SE mode (https://gem5-review.googlesource.com/c/public/gem5/+/12307). Feel free to review it if it's interesting to you.
1) I don't understand what you are asking. 2) The new patch has an implementation. 3) We could probably add an implementation that flushes file-backed mmaps to the host file. I have never run into a situation where this was needed in an application that was being simulated (so it doesn't have an implementation). 4) It turns out that fork is not used in Linux to create a new process. It uses the clone system call instead. (You can verify this by using the Linux strace command with your application. You should only see a clone call.) You should take a look at the clone implementation. Regards, Brandon -----Original Message----- From: gem5-dev <[email protected]> On Behalf Of Maryam Babaie Sent: Friday, March 8, 2019 4:06 PM To: [email protected] Subject: [gem5-dev] Syscall_Emulation for Shared Memory Hi all, I have some questions regarding the system calls available in SE mode on gem5 for X86. I appreciate if any one shares their insight about them: 1. For the mmap syscall, the function "mmapImpl" has been implemented. Up-to which extend this function will work properly for mmap syscall? 2. For munmap syscall, they have put the munmapFunc, but the body of the corresponding function is actually empty. So, does this mean it is actually not supported on gem5? 3. msync syscall is flagged as unimplementedFunc. So, does this mean that mmap will still work but the writes will not be reflected persistently in the region? 4. Since the fork syscall is also flagged as unimplementedFunc , how is the concept of Copy on Write (generally shared pages) able to be simulated and handled in gem5? Regards _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
