提交 d586d785 编写于 作者: J Joerg Roedel

x86/amd-iommu: Add function to flush all DTEs on one IOMMU

This function flushes all DTE entries on one IOMMU for all
devices behind this IOMMU. This is required for command
buffer resetting later.
Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
上级 e394d72a
...@@ -516,6 +516,19 @@ void amd_iommu_flush_all_domains(void) ...@@ -516,6 +516,19 @@ void amd_iommu_flush_all_domains(void)
flush_all_domains_on_iommu(iommu); flush_all_domains_on_iommu(iommu);
} }
static void flush_all_devices_for_iommu(struct amd_iommu *iommu)
{
int i;
for (i = 0; i <= amd_iommu_last_bdf; ++i) {
if (iommu != amd_iommu_rlookup_table[i])
continue;
iommu_queue_inv_dev_entry(iommu, i);
iommu_completion_wait(iommu);
}
}
void amd_iommu_flush_all_devices(void) void amd_iommu_flush_all_devices(void)
{ {
struct amd_iommu *iommu; struct amd_iommu *iommu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册