On Thu, Jun 30, 2011 at 4:24 PM, Ching-Tsun Chou <[email protected]>wrote:
> When Marss is in the emulation mode (i.e., when it is running QEMU only and > not PTLsim), do the guest's memory operations still go through the cache > hierarchy model? Or are they directly satisfied by the guest's memory? > > No, none of the memory access go through simulated cache model. > If the answer is the former, then QEMU needs to be modified to use > the cache hierarchy model. Could you point out where the code changes in > QEMU are? > > There are few people working on it but I am not sure about their progress. Its little complicated because QEMU uses JIT which convert VM instructions into simple opcodes and then compile them into binary for optimized performance. This is called Tiny Code Generator (TCG) which has also modified the old method of memory access that was using 'softmmu_template.h' file. You'll have to look up TCG code to find out how all memory access in emulation mode is done. > If the answer is the latter, does it mean that the switch from simulation > mode to emulation mode would involve some sort of draining of the cache > hierarchy to memory to ensure that all modified cache lines are written back > to memory? Could you point out where the code for doing that is? > > In simulation mode, all the caches dont store any data. They only hold the cache line addresses and cache line states. On a memory write, if line is in valid state then it's data is directly written to RAM and we just simulate the delay in caches. - Avadh > Thanks! > - Ching Tsun >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
