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] [PATCH] VT-d: fix iommu_domid for PCI/PCIx devices assignmen

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] VT-d: fix iommu_domid for PCI/PCIx devices assignment
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Thu, 31 Dec 2009 17:23:27 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 31 Dec 2009 01:23:54 -0800
Envelope-to: www-data@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqJ+uiuuR8HGhy3Q76l3BItwQe2ag==
Thread-topic: [Xen-devel] [PATCH] VT-d: fix iommu_domid for PCI/PCIx devices assignment
Currently, it clears iommu_domid and domid_map at the end of 
domain_context_unmap_one() if no other devices under the same iommu owned by 
this domain. But, when assign a PCI/PCIx device to a guest, it also assigns its 
upstream bridge to the guest, and they use the same iommu_domid. In the 
deassignment, the iommu_domid and domid_map are cleared in 
domain_context_unmap_one() for the assigned PCI/PCIx device, therefore it 
cannot get valid iommu_domid in followed domain_context_unmap_one for its 
upstream bridge. It causes PCI/PCIx device re-assignment failure.

This patch moves the iommu_domid and domid_map clearing code to the end of 
domain_context_unmap, where all dependent domain_context_unmap_one()s are 
completed, thus fix above issue.

Signed-off-by: Weidong Han <Weidong.han@xxxxxxxxx>

Attachment: fix-iommu-domid.patch
Description: fix-iommu-domid.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] VT-d: fix iommu_domid for PCI/PCIx devices assignment, Han, Weidong <=