WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Readonly memory for guest domain

To: Peter Teoh <htmldeveloper@xxxxxxxxx>
Subject: Re: [Xen-devel] Readonly memory for guest domain
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 13 Sep 2007 07:34:10 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Sep 2007 23:30:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <804dabb00709121859te561d2cjdfeac95876b9778@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acf10BeFVlaeIGHDEdyTlQAWy6hiGQ==
Thread-topic: [Xen-devel] Readonly memory for guest domain
User-agent: Microsoft-Entourage/11.3.6.070618
Yeah, it doesn’t really work as you describe!

 K.

On 13/9/07 02:59, "Peter Teoh" <htmldeveloper@xxxxxxxxx> wrote:


On 9/12/07, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
Xen does not have this general read-only restriction. It does force page tables to be read-only, otherwise a guest could grant itself access to arbitrary memory that it does not own.

Thank you for the answer.   In the first place, we will not know what is pagetable or non-pagetable memory.   For example, during dom0/domU initialisation, the guest OS will query the e820 bios mechanism for physical memory  availability, and the guest OS (paravirt or HVM) will then assign different parts of the physical memory for pagetable construction.   Then after all the pagetable is completely constructed, the CR3 is loaded, which started the hardware MMU operation.    So therefore, before the CR3 is loaded the entire physical memory is marked as readonly, and after the CR3 is loaded, only those memory not involved in pagetable mapping are unmarked readonly?

Does not seem right, as guest OS can change the CR3 anytime subsequently as well.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel