From: Sheng Yang Date: Thu, 6 Aug 2009 05:31:56 +0000 (+0800) Subject: intel-iommu: Fix enabling snooping feature by mistake X-Git-Tag: v2.6.31-rc6~43^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5b1525533c484238015c48c78f86d49a1bfb86b;p=pandora-kernel.git intel-iommu: Fix enabling snooping feature by mistake Two defects work together result in KVM device passthrough randomly can't work: 1. iommu_snooping is not initialized to zero when vm_iommu_init() called. So it is possible to get a random value. 2. One line added by commit 2c2e2c38("IOMMU Identity Mapping Support") change the code path, let it bypass domain_update_iommu_cap(), as well as missing the increment of domain iommu reference count. The latter is also likely to cause a leak of domains on repeated VMM assignment and deassignment. Signed-off-by: Sheng Yang Signed-off-by: David Woodhouse --- Reading git-diff-tree failed