]> 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)
commitd3fdb3a3f0faa86057703c9bf4eb50c111b9aae7
tree384c8517f6aee9a09a43ac55c7d0cbadc3d2ee23
parent19596882ed20e7417c5d5e2f10d7cf1c23a95eba
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