]> git.baikalelectronics.ru Git - kernel.git/commit
intel-iommu: Only unlink device domains from iommu
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 24 May 2011 16:19:04 +0000 (12:19 -0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 1 Jun 2011 11:47:29 +0000 (12:47 +0100)
commit60c20dddc3444004b67bf42061faf410412c1e94
tree384c8517f6aee9a09a43ac55c7d0cbadc3d2ee23
parentc3be0e873f265ef894f72fab3345d64eebb0de6c
intel-iommu: Only unlink device domains from iommu

Commit 13f97503 added unlinking domains from iommus to reciprocate the
iommu from domains unlinking that was already done.  We actually want
to only do this for device domains and never for the static
identity map domain or VM domains.  The SI domain is special and
never freed, while VM domain->id lives in their own special address
space, separate from iommu->domain_ids.

In the current code, a VM can get domain->id zero, then mark that
domain unused when unbound from pci-stub.  This leads to DMAR
write faults when the device is re-bound to the host driver.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c