From mboxrd@z Thu Jan 1 00:00:00 1970 From: PUCCETTI Armand Subject: Re: More page-table questions. Date: Mon, 12 Mar 2007 18:27:25 +0100 Message-ID: <45F58D7D.6090703@cea.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "Petersson, Mats" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser a =E9crit : > On 12/3/07 16:26, "Petersson, Mats" wrote: > > =20 >> Are the page-tables ever updated directly by the guest, or is it all >> done via hyper-calls? >> =20 > > Leaf PTEs (i.e., really just PTEs, not PDEs) can be directly written fr= om > the point-of-view of the guest. In fact they are trapped and emulated b= y > Xen. The guest is somewhat aware of this because it has explicitly > write-protected all its pagetables, so if it were to attempt the direct > write on native hardware in these circumstances it would receive a page > fault. > > -- Keir > > > =20 This is unclear to me: "a guest believes he can write PTEs" means that his source code to access the page tables is left unchanged between=20 legacy and PV version? Merely, the hypervisor traps the guest's accesses to the page tables, to=20 control what he is doing (e.g. not overlapping any other domain's pages) and=20 allowing or denying any writes. This should apply to any page table level, so why only=20 blocking writes to PTEs? This is for 4K pages, but how are 2M pages mixed? or do we assume that=20 every domain pages are 4K? Armand