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

Re: [Xen-devel] [1/2] [XEN] gnttab: Add new op unmap_and_replace


  • To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Wed, 09 May 2007 13:55:08 +0100
  • Delivery-date: Wed, 09 May 2007 05:53:43 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceSOUV9g/E3Wv4sEduwogAX8io7RQ==
  • Thread-topic: [Xen-devel] [1/2] [XEN] gnttab: Add new op unmap_and_replace

On 9/5/07 12:31, "Herbert Xu" <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> [XEN] gnttab: Add new op unmap_and_replace

There's considerable code duplication in common/grant_table.c. Could we
please somehow merge __gnttab_unmap() and __gnttab_unmap_and_replace(),
because they only differ right now in the struct type they take, and in the
function they call to do the actual unmap or unmap-and-replace work. Perhaps
their wrappers could stuff a 'union structure' of some sort, with enough
discrimination to ensure the correct underlying arch-specific function is
called? We could even only supply unmap-and-replace functionality at the
arch-specific interface and have new_addr==NULL/zero-pte mean we want the
the old-style unmap semantics. Then the wrapper for unmap_op can stuff that
field in the 'union structure' with zero to do the right thing.

 -- Keir


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


 


Rackspace

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