[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 0/3] [RFC] User-space grant table device

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.