Hi Blue, > > You mean like what KVM does for shadow page table? I think we should > > mprotect the QEMU virtual memory which is allocated as a guest page > > table by the guest OS, right? If so, how do we know what (QEMU) virtual > > memory we should protect? The other way I was thought of is to see if > > we can aware some guest code sequence modifying pte, but so far no clue > > to it. > > See for example notdirty and watch_mem handling in exec.c.
There are functions st{l,q}_phys_notdirty and notdirty_mem_write, you mean which one? Sadly, I am not familiar with the memory stuff. Could you explain a little bit about what notdirty and watch_mem does? Googleing doesn't help much... Thanks! Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj