From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jui-Hao Chiang Subject: Consult some concepts about shadow paging mechanism Date: Wed, 22 Apr 2009 09:14:02 -0400 Message-ID: <52cf60ee0904220614m343aa6c2v13c244fc878825f7@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Dear All: I am pretty new to xen-devel, please correct me in the following. Assume we have the following terms GPT: guest page table SPT: shadow page table (Question a) When guest OS is running, is it always using SPT for address translation? If it is the case, how does guest OS refer and modify its own GPT content? It seems that there is a page table entry in SPT for the GPT page. (Question b) The hypervisor is performing synchronization between GPT and SPT. When guest OS increase access to some page (call it Normal_Page) by marking 'read only' GPT entries as 'read write', what's the read-write mode of the GPT page in the beginning? (1) If it's read-only in SPT, the this modification will trigger a page fault for GPT page, so that hypervisor can synchronize those two tables at this moment. (2) If it's read-write in SPT, then the page fault will only occur when guest first write the Normal_Page content since the SPT entry has read-only for the Normal_Page. Then hypervisor change the SPT entry to read-write and to make sure it's the same as GPT, and return to guest OS to run. Thanks for your patience to look at these questions. Jui-Hao