iommu/amd-vi: avoid pointless flushes in invalidate_all_domain_pages()

Fix invalidate_all_domain_pages() to only attempt to flush the domains
that have IOMMU enabled, otherwise the flush is pointless.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2023-07-10 12:19:25 +02:00
1 parent 9473d9a241
commit fd62986f6b
1 file changed
+3 -1
+3 -1
View File
@@ -1532,8 +1532,10 @@ int __init amd_iommu_init_late(void)
static void invalidate_all_domain_pages(void)
{
struct domain *d;
for_each_domain( d )
amd_iommu_flush_all_pages(d);
if ( is_iommu_enabled(d) )
amd_iommu_flush_all_pages(d);
}
static int cf_check _invalidate_all_devices(
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.