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] [1/2] [XEN] gnttab: Add new op unmap_and_replace

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [1/2] [XEN] gnttab: Add new op unmap_and_replace
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Wed, 09 May 2007 13:55:08 +0100
Delivery-date: Wed, 09 May 2007 05:53:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070509113117.GB12586@xxxxxxxxxxxxxxxxxxx>
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: AceSOUV9g/E3Wv4sEduwogAX8io7RQ==
Thread-topic: [Xen-devel] [1/2] [XEN] gnttab: Add new op unmap_and_replace
User-agent: Microsoft-Entourage/11.3.3.061214
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