]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Flush old domains in kdump kernel
authorStuart Hayes <stuart.w.hayes@gmail.com>
Thu, 5 Sep 2019 17:09:48 +0000 (12:09 -0500)
committerJoerg Roedel <jroedel@suse.de>
Fri, 6 Sep 2019 08:34:30 +0000 (10:34 +0200)
commitafc14645d5d3e8fc21a31ef9fe67821cb7a0b1bd
tree962729ebac93895a8de95933a169ecd320a1eaf7
parentbd8d9ff066a3a25db80c188d2876e7c8a7d1d840
iommu/amd: Flush old domains in kdump kernel

When devices are attached to the amd_iommu in a kdump kernel, the old device
table entries (DTEs), which were copied from the crashed kernel, will be
overwritten with a new domain number.  When the new DTE is written, the IOMMU
is told to flush the DTE from its internal cache--but it is not told to flush
the translation cache entries for the old domain number.

Without this patch, AMD systems using the tg3 network driver fail when kdump
tries to save the vmcore to a network system, showing network timeouts and
(sometimes) IOMMU errors in the kernel log.

This patch will flush IOMMU translation cache entries for the old domain when
a DTE gets overwritten with a new domain number.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Fixes: e2b6c482ca71 ('iommu/amd: Copy old trans table from old kernel')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c