From: Keir Fraser Subject: Re: xsd_kva mmap Date: Mon, 6 Mar 2006 19:19:44 +0000 Message-ID: <989e5b7733ebbfed8423ab1f981b1b58@cl.cam.ac.uk> References: <20060306183023.GA7814@sorel.sous-sol.org> <2510641adc7c67a4d0d20a0224b0ece5@cl.cam.ac.uk> <20060306191150.GV3883@sorel.sous-sol.org> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060306191150.GV3883@sorel.sous-sol.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Wright Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 6 Mar 2006, at 19:11, Chris Wright wrote: >> Also, your patch would need to set vma->vm_pgoff before calling >> remap_pfn_range(), or the unmap code will incorrectly mess with page >> reference counts (because the skanky VM_PFNMAP check in vm_normal_page >> would not trigger and so that function will return non-NULL). > > Thanks for the eyes, esp. considering that's what the original fix was > all about ;-) Actually, now I look again, it appears that remap_pfn_range() deals with the re-setting of vm_pgoff itself (conditional on is_cow_mapping(), and prefixed with an enormous comment). So re-setting in the caller is unnecessary and your patch is just fine. I think there are one or two other places in Xen code that I munge vm_pgoff, so I guess I can clean up a little now. :-) Sorry about that... -- Keir