Received: from eggs.gnu.org ([208.118.235.92]:60242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzJDO-0007vk-6V for qemu-devel@nongnu.org; Wed, 08 Aug 2012 23:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzJDM-0006EL-Sx for qemu-devel@nongnu.org; Wed, 08 Aug 2012 23:15:14 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:47661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzJDM-00067u-C4 for qemu-devel@nongnu.org; Wed, 08 Aug 2012 23:15:12 -0400 Date: Thu, 9 Aug 2012 11:15:00 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120809031500.GA71617@cs.nctu.edu.tw> References: <20120808073856.GA84469@cs.nctu.edu.tw> <20120808083357.GA89605@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Peter Maydell , qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Hi Blue, > > You mean like what KVM does for shadow page table? I think we shoul= d > > 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) virtu= al > > 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 cl= ue > > to it. >=20 > 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? Googlein= g=20 doesn't help much... Thanks! Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) 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