diff options
author | Vasant Hegde <[email protected]> | 2024-06-20 06:05:52 +0000 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2024-06-27 12:13:48 +0200 |
commit | c362f32a59a84fe4453abecc6b53f5f70894a6d5 (patch) | |
tree | 48102d82698dad81e5d51acb1b521c3188a48f1a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | f2661062f16b2de5d7b6a5c42a9a5c96326b8454 (diff) |
iommu/amd: Invalidate cache before removing device from domain list
Commit 87a6f1f22c97 ("iommu/amd: Introduce per-device domain ID to fix
potential TLB aliasing issue") introduced per device domain ID when
domain is configured with v2 page table. And in invalidation path, it
uses per device structure (dev_data->gcr3_info.domid) to get the domain ID.
In detach_device() path, current code tries to invalidate IOMMU cache
after removing dev_data from domain device list. This means when domain
is configured with v2 page table, amd_iommu_domain_flush_all() will not be
able to invalidate cache as device is already removed from domain device
list.
This is causing change domain tests (changing domain type from identity to DMA)
to fail with IO_PAGE_FAULT issue.
Hence invalidate cache and update DTE before updating data structures.
Reported-by: FahHean Lee <[email protected]>
Reported-by: Dheeraj Kumar Srivastava <[email protected]>
Fixes: 87a6f1f22c97 ("iommu/amd: Introduce per-device domain ID to fix potential TLB aliasing issue")
Tested-by: Dheeraj Kumar Srivastava <[email protected]>
Tested-by: Sairaj Arun Kodilkar <[email protected]>
Tested-by: FahHean Lee <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
Reviewed-by: Jerry Snitselaar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions