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] [PATCH 0/3] [RFC] User-space grant table device

To: Derek Murray <Derek.Murray@xxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/3] [RFC] User-space grant table device
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Mon, 19 Mar 2007 15:11:12 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 19 Mar 2007 08:10:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1HTIt8-0006If-00@xxxxxxxxxxxxxxxxx>
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: AcdqONSLEyqrCdYsEduRVQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH 0/3] [RFC] User-space grant table device
User-agent: Microsoft-Entourage/11.2.5.060620
On 19/3/07 14:31, "Derek Murray" <Derek.Murray@xxxxxxxxxxxx> wrote:

>> 3. Just looking at linux-changes.patch, I think the new interface function's
>> semantics need to be clearer. Do you really mean for the hook function to be
>> called *and* for unmap_page_range() to do the usual zap_pud_range() work?
>> Should the hook function return anything? What about responsibility for
>> synchronising TLBs?
> 
> Might it be better to replace this hook with something that operates on the
> PTE (rather than vm_area) level? Thus the hook could be called from
> zap_pte_range(), and this would harness all the TLB synchronisation that is
> normally employed.

I think that might be better, yes. It avoids needing to do pagetable walking
in your driver to find the pte's and you can also use tlb_remove_tlb_entry()
on each pte you zap to cause an eventual tlb flush on tlb_finish_mmu()
(which is called from the caller of unmap_page_range())..

> I'm not sure that the hook function should return anything: as far as I
> understand, the unmap-grant hypercall should not fail, and, if it does, I
> don't see how we can recover from that.

You're probably right, especially if you implement the hook as a
zap_pte_range() alternative.

 -- Keir


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