]> xenbits.xensource.com Git - xen.git/commit
IOMMU: prevent VT-d device IOTLB operations on wrong IOMMU
authorMalcolm Crossley <malcolm.crossley@citrix.com>
Tue, 24 Jun 2014 08:23:12 +0000 (10:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Jun 2014 08:23:12 +0000 (10:23 +0200)
commite58d4039d408f8b9342fa5a20a515b9a1909a313
tree10824e0015533df7e6353cad7538431b5b1d4aee
parent3211e8e941396a937442b7a6d8ec9b030cf8953d
IOMMU: prevent VT-d device IOTLB operations on wrong IOMMU

PCIe ATS allows for devices to contain IOTLBs, the VT-d code was iterating
around all ATS capable devices and issuing IOTLB operations for all IOMMUs,
even though each ATS device is only accessible via one particular IOMMU.

Issuing an IOMMU operation to a device not accessible via that IOMMU results
in an IOMMU timeout because the device does not reply. VT-d IOMMU timeouts
result in a Xen panic.

Therefore this bug prevents any Intel system with 2 or more ATS enabled IOMMUs,
each with an ATS device connected to them, from booting Xen.

The patch adds a IOMMU pointer to the ATS device struct so the VT-d code can
ensure it does not issue IOMMU ATS operations on the wrong IOMMU. A void
pointer has to be used because AMD and Intel IOMMU implementations do not have
a common IOMMU structure or indexing mechanism.

Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 84c340ba4c3eb99278b6ba885616bb183b88ad67
master date: 2014-06-18 15:50:02 +0200
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/ats.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/x86/ats.c
xen/drivers/passthrough/x86/ats.c