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

[Xen-devel] Re: [PATCH] AMD IOMMU: Hanlde sibling device assignment corr

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] AMD IOMMU: Hanlde sibling device assignment correctly
From: Wei Wang2 <wei.wang2@xxxxxxx>
Date: Wed, 07 May 2008 12:17:44 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 May 2008 03:18:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C4473AC0.205B5%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: <C4473AC0.205B5%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2008-05-07 at 10:53 +0100, Keir Fraser wrote:
> 
> 
> On 7/5/08 10:27, "Wei Wang2" <wei.wang2@xxxxxxx> wrote:
> 
> > Devices on AMD IOMMU system share a same set of IO page tables if they
> > are indexed by a same device ID in device table. To prevent these
> > sibling devices from being assigned to different domains, a successful
> > device assignment requires all sibling devices are owned by  either
> > pciback or the target domain. This is a trial patch with minor
> > modifications in the common interface to handle this situation
> > correctly.  VTD code has also been slightly touched please let me know
> > if it breaks any VTD functionality. Thanks!
> 
> This patch seems to do more than you suggest, for example adding an extra
> iommu hook into setup.c for dom0. 
My idea is to let dom0 construct pci device list according to
configuration of pciback.hide=(). If a device is not hidden from dom0,
it might be in use by dom0, then it could be dangerous to assign any of
its siblings to other passthru domain. It is not very clean to hook into
setup.c but I failed to find any better way to this  :(

> Also it does get_domain_by_id() with no
> corresponding put_domain(). And in fact you should be able to
> rcu_lock_domain_by_id()/rcu_unlock_domain() instead which is faster.
Thanks, I will update that.


>  -- Keir

> 
> 



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