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

[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

 


Rackspace

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