From: "Jacob Gorm Hansen" Subject: Re: XENFEAT_writable_pagetables vs VMASST_TYPE_writable_pagetables Date: Wed, 31 May 2006 17:09:16 +0200 Message-ID: References: <8e5c0a72f56dc3168831c47cbbf0a216@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <8e5c0a72f56dc3168831c47cbbf0a216@cl.cam.ac.uk> Content-Disposition: inline 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: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 5/31/06, Keir Fraser wrote: > It's a case of really bad naming: XENFEAT_writable_pagetables means > that none of the pagetables need to be write-protected or pinned > (presumably because you are permanently on shadow page tables). Whereas > the vmassist simply means that you can attempt to directly write to > your bottom-level PTEs, but page tables must generally be pinned and > write-protected. Thanks for clearing this up. The problem I have is that I am trying to prevent writable mappings inside the linux guest, by (among other measures) moving _PAGE_RW to _PAGE_AVAIL2 in HYPERVISOR_update_va_mapping() before performing the hypercall to Xen. This works everywhere, except the call at the bottom of pgd_walk() when called from __pgd_unpin(). If the pgd is not writable after unpin, weird stuff starts to happen --- the next call to pmd_clear() from free_pte_range() fails in Xen, citing incorrect page types. Can you tell me why linux/xen/the wrpt implementation cannot handle the unpinned pgd being mapped read-only like this? Thanks, Jacob