From: Jiang Liu Date: Fri, 11 Jul 2014 06:19:29 +0000 (+0800) Subject: iommu/vt-d: Allocate dynamic domain id for virtual domains only X-Git-Tag: omap-for-v3.17/fixes-against-rc2~158^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44bde61428f7719c54a2074443edddf0e827296c;p=pandora-kernel.git iommu/vt-d: Allocate dynamic domain id for virtual domains only Check the same domain id is allocated for si_domain on each IOMMU, otherwise the IOTLB flush for si_domain will fail. Now the rules to allocate and manage domain id are: 1) For normal and static identity domains, domain id is allocated when creating domain structure. And this id will be written into context entry. 2) For virtual machine domain, a virtual id is allocated when creating domain. And when binding virtual machine domain to an iommu, a real domain id is allocated on demand and this domain id will be written into context entry. So domain->id for virtual machine domain may be different from the domain id written into context entry(used by hardware). Signed-off-by: Jiang Liu Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed