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] Remove physmap page upon granttab xfer

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Remove physmap page upon granttab xfer
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 29 May 2008 19:02:49 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 29 May 2008 03:03:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C462F4E4.2152B%keir.fraser@xxxxxxxxxxxxx>
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>
References: <20080528102821.GH29174%yamahata@xxxxxxxxxxxxx> <C462F4E4.2152B%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Wed, May 28, 2008 at 11:39:16AM +0100, Keir Fraser wrote:
> On 28/5/08 11:28, "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx> wrote:
> 
> > Although I know that grant table page transfer is obsoleted,
> > what is the expected exact semantics of GNTTABOP_transfer with
> > the p2m/m2p table?
> > 
> > I suppose the right fix would be
> > - revert this patch and
> > - put the iommu opration of pv domain into MMU_MACHPHYS_UPDATE.
> 
> After the grant transfer operation completes the page no longer belongs to
> the backend domain. Thus, for absolute safety and isolation, the page must
> be removed from the backend domain's IOMMU mappings before completion of the
> grant transfer operation. Actually we should be flushing host CPU TLBs too.

Thank you for explanation.
The patch breaks ia64 granttab xfer breakage so that it have to be fixed.
However the operation is now obsoleted one, so I don't want to make
big effort to fix.
What do you think about the following patch?


Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

--- ./grant_table.c     2008-05-28 18:47:40.000000000 +0900
+++ ./grant_table.c-if  2008-05-29 18:27:05.000000000 +0900
@@ -1112,7 +1112,8 @@ gnttab_transfer(
             goto copyback;
         }
 
-        guest_physmap_remove_page(d, gop.mfn, mfn, 0);
+        if (!paging_mode_translate(d))
+            guest_physmap_remove_page(d, gop.mfn, mfn, 0);
 
         /* Find the target domain. */
         if ( unlikely((e = rcu_lock_domain_by_id(gop.domid)) == NULL)
)

or #ifndef __ia64__ 

-- 
yamahata

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