From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gorm Hansen Subject: Re: Tracking changes to writable page tables Date: Sun, 15 May 2005 12:23:08 -0700 Message-ID: <4287A19C.8070702@diku.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: xen-devel List-Id: xen-devel@lists.xenproject.org Ian Pratt wrote: >>It looks like xenlinux 2.6 now uses writable page tables by >>default (I can't find the switch to enable/disable them). >> >>I need to track writes to page tables, and I was wondering if >>it is possible to get a page fault upon writes to read-only >>mapped page tables, as when writing to other read-only mappings? > > > Hmm, I can see that the current model makes like difficult for you > (though self-migration is a pretty twisted thing to be trying to do > anyway :-) > > I wander if we should steal one of the OS bits in the PTE to > differentiate writable pagetable mappings? You could then take a normal > RO fault, set the bit, and then retry to have Xen do pagetable the work. > > This would arguably be cleaner, though we've been reluctant to steal OS > bits just incase there's some OS out there that uses them all. Actually, it seems this could be done without using an AVL bit, as this is really per-frame rather than per-VA information. If the pte-pin call could add a 'propagate page fault' flag to the PTE frame, then I could still get the first fault to the guest, and then remove the pinning bit to prevent the rest of the faults. Jacob